We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0138a3 commit 3b60d30Copy full SHA for 3b60d30
lib/Mage/HTTP/Client/Curl.php
@@ -444,15 +444,7 @@ protected function parseHeaders($ch, $data): int
444
*/
445
protected function validateHttpVersion(array $line)
446
{
447
- if ($line[0] === 'HTTP/1.0' || $line[0] === 'HTTP/1.1') {
448
- if (count($line) !== 3) {
449
- $this->doError('Invalid response line returned from server: ' . implode(' ', $line));
450
- }
451
-
452
- return;
453
454
455
- if ($line[0] === 'HTTP/2') {
+ if (in_array($line[0], ['HTTP/2', 'HTTP/1.0', 'HTTP/1.1'])) {
456
if (!in_array(count($line), [2, 3])) {
457
$this->doError('Invalid response line returned from server: ' . implode(' ', $line));
458
}
0 commit comments