Skip to content

Commit

Permalink
Allow to read HTTP/2 response header.
Browse files Browse the repository at this point in the history
The issue is HTTP/2 sends the following headers `HTTP/2 200`, `HTTP/2 401`
and so on. It doesn't have third parameter like HTTP/1.1 has: `HTTP/2 200 OK`
  • Loading branch information
vovayatsyuk authored and gelanivishal committed Nov 16, 2018
1 parent 0f57a30 commit ebe4af7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/HTTP/Client/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ protected function parseHeaders($ch, $data)
{
if ($this->_headerCount == 0) {
$line = explode(" ", trim($data), 3);
if (count($line) != 3) {
if (count($line) < 2) {
$this->doError("Invalid response line returned from server: " . $data);
}
$this->_responseStatus = intval($line[1]);
Expand Down

0 comments on commit ebe4af7

Please sign in to comment.