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 committed Nov 10, 2018
1 parent 072ef37 commit e827b32
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 @@ -438,7 +438,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 = (int)$line[1];
Expand Down

0 comments on commit e827b32

Please sign in to comment.