Details
-
Bug
-
Resolution: Fixed
-
Medium
-
5.3.4
-
None
-
eZ Publish 5.3.4
Nginx 1.4.6
MySQL 14.14
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
- Install content staging 5.3
- Create a new folder on source
- Sync the created event
The sync will look like it failed, but it didn't.
This is because of the response in the headers.