Skip to content

Commit 3b60d30

Browse files
committed
1 parent f0138a3 commit 3b60d30

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/Mage/HTTP/Client/Curl.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -444,15 +444,7 @@ protected function parseHeaders($ch, $data): int
444444
*/
445445
protected function validateHttpVersion(array $line)
446446
{
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') {
447+
if (in_array($line[0], ['HTTP/2', 'HTTP/1.0', 'HTTP/1.1'])) {
456448
if (!in_array(count($line), [2, 3])) {
457449
$this->doError('Invalid response line returned from server: ' . implode(' ', $line));
458450
}

0 commit comments

Comments
 (0)