Skip to content

Commit

Permalink
MAGETWO-31613: [GITHUB] Magento API fails in a CGI env (zf1 issue) #790
Browse files Browse the repository at this point in the history
- Upgraded zf1 from 1.12.9 to 1.12.10
- Removed patched fix from Zend_Controller_Request_Http::getHeader since zf 1.12.10 has the actual fix
  • Loading branch information
anupdugar committed Feb 9, 2015
1 parent 209cfbe commit 7d2acfc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 25 deletions.
18 changes: 0 additions & 18 deletions app/code/Magento/Webapi/Controller/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,4 @@ public function getCookie($name = null, $default = null)
{
return $this->_cookieReader->getCookie($name, $default);
}

/**
* {@inheritdoc}
*
* Added CGI environment support.
*/
public function getHeader($header)
{
$headerValue = parent::getHeader($header);
if ($headerValue == false) {
/** Workaround for php-fpm environment */
$header = strtoupper(str_replace('-', '_', $header));
if (isset($_SERVER[$header]) && in_array($header, ['CONTENT_TYPE', 'CONTENT_LENGTH'])) {
$headerValue = $_SERVER[$header];
}
}
return $headerValue;
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"zendframework/zend-serializer": "2.3.1",
"zendframework/zend-log": "2.3.1",
"zendframework/zend-http": "2.3.1",
"magento/zendframework1": "1.12.9-patch1",
"magento/zendframework1": "1.12.10",
"composer/composer": "1.0.0-alpha8",
"monolog/monolog": "1.11.0",
"tubalmartin/cssmin": "2.4.8-p4"
Expand Down
13 changes: 7 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7d2acfc

Please sign in to comment.