Skip to content

Commit

Permalink
OM PR 4368
Browse files Browse the repository at this point in the history
  • Loading branch information
fballiano committed Nov 24, 2024
1 parent f0138a3 commit 3b60d30
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/Mage/HTTP/Client/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit 3b60d30

Please sign in to comment.