diff --git a/Model/Api/Http/Client.php b/Model/Api/Http/Client.php index 0cda60b..38ae868 100644 --- a/Model/Api/Http/Client.php +++ b/Model/Api/Http/Client.php @@ -32,10 +32,13 @@ protected function parseHeaders($ch, $data) } if ($this->_headerCount == 0) { $line = explode(" ", trim($data), 3); - if (count($line) != 3) { + if (count($line) < 2) { $this->doError("Invalid response line returned from server: " . $data); } $code = intval($line[1]); + if (!HttpCode::execute($code)) { + $this->doError("Invalid response line returned from server: " . $data); + } if ($code === 100) { // Handle status 100 Continue $this->skipNextHeader = true; diff --git a/Model/Api/Http/HttpCode.php b/Model/Api/Http/HttpCode.php new file mode 100755 index 0000000..ca4ddf7 --- /dev/null +++ b/Model/Api/Http/HttpCode.php @@ -0,0 +1,68 @@ + - v1.9.0 + v1.9.1 0 0 0