Skip to content

Commit ebe4af7

Browse files
vovayatsyukgelanivishal
authored andcommitted
Allow to read HTTP/2 response header.
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`
1 parent 0f57a30 commit ebe4af7

File tree

1 file changed

+1
-1
lines changed
  • lib/internal/Magento/Framework/HTTP/Client

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/HTTP/Client/Curl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ protected function parseHeaders($ch, $data)
432432
{
433433
if ($this->_headerCount == 0) {
434434
$line = explode(" ", trim($data), 3);
435-
if (count($line) != 3) {
435+
if (count($line) < 2) {
436436
$this->doError("Invalid response line returned from server: " . $data);
437437
}
438438
$this->_responseStatus = intval($line[1]);

0 commit comments

Comments
 (0)