Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-24216

Character ":" being returned in the http header

    XMLWordPrintable

    Details

      Description

      We are having problems using the 'eZ Publish Content Staging LS' extension version 5.3 on an 'eZ Publish 5.3.4 Enterprise Installation' with nginx 1.4 (the same occurs with version 1.6).
      Simply put, when we try to sync an event from the source installation to the target installation, we are receiving the following error:

      HTTP error (HTTP/1.1 204:)
      

      We have found that this error is caused due to the fact that php enters the following if statement, generating an ERROR_BAD_RESPONSE respone:

      file:
      ezpublish_legacy/extension/ezcontentstaging/classes/private/ezrestclient.php

      line 534:

       if ( !preg_match( '/^HTTP/[0-9]+.[0-9]+ (20[0-9]) /', $data, $matches ) )
              {
                  $errstr = substr( $data, 0, strpos( $data, "n" ) - 1 );
                  if ( preg_match( '/^HTTP/[0-9]+.[0-9]+ ([0-9]{3}) (.*)/', $errstr, $matches ) )
                  {
                      $this->errorNumber = self::ERROR_NON_200_RESPONSE;
                      $this->errorString = 'HTTP error ' . $matches[1] . ' (' . $matches[2] . ')';
                  }
                  else
                  {
                      $this->errorNumber = self::ERROR_BAD_RESPONSE;
                      $this->errorString = 'HTTP error (' . $errstr . ')';
                  }
                  return false;
              }
      

      The problem is that on nginx:

      $data = HTTP/1.1 204:
      

      On the other hand, we do not receive any sync errors using apache as:

      $data = HTTP/1.1 204
      

      When using nginx the response seems to be unexpected, and the following message is displayed. (see the screenshot attached)

      Content staging assumes that the sync failed and will keep the event in the source, which is wrong.


      Steps to reproduce:

      Start from a 5.3.4 environment

      1. Install content staging 5.3
      2. Create a new folder on source
      3. Sync the created event

      The sync will look like it failed, but it didn't.
      This is because of the response in the headers.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            ricardo.correia-obsolete@ez.no Ricardo Correia (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours
                2h