From 3b60d3081c300b2a98e1fb80b6ecbc87eeb17572 Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Sun, 24 Nov 2024 09:23:54 +0000 Subject: [PATCH] OM PR 4368 OpenMage/magento-lts#4368 --- lib/Mage/HTTP/Client/Curl.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/lib/Mage/HTTP/Client/Curl.php b/lib/Mage/HTTP/Client/Curl.php index e67c25db5..0a250d0ed 100644 --- a/lib/Mage/HTTP/Client/Curl.php +++ b/lib/Mage/HTTP/Client/Curl.php @@ -444,15 +444,7 @@ protected function parseHeaders($ch, $data): int */ protected function validateHttpVersion(array $line) { - if ($line[0] === 'HTTP/1.0' || $line[0] === 'HTTP/1.1') { - if (count($line) !== 3) { - $this->doError('Invalid response line returned from server: ' . implode(' ', $line)); - } - - return; - } - - if ($line[0] === 'HTTP/2') { + if (in_array($line[0], ['HTTP/2', 'HTTP/1.0', 'HTTP/1.1'])) { if (!in_array(count($line), [2, 3])) { $this->doError('Invalid response line returned from server: ' . implode(' ', $line)); }