Skip to content

Commit

Permalink
Merge pull request #20 from VC24/master
Browse files Browse the repository at this point in the history
Handle multiple HTTP/1.1 100 Continue responses
  • Loading branch information
amouhzi committed Dec 16, 2015
2 parents 67f7c49 + 3f45583 commit 236d89d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Curl/Curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function _exec()
$this->response_headers = '';
if (!(strpos($this->response, "\r\n\r\n") === false)) {
list($response_header, $this->response) = explode("\r\n\r\n", $this->response, 2);
if ($response_header === 'HTTP/1.1 100 Continue') {
while (strtolower(trim($response_header)) === 'http/1.1 100 continue') {
list($response_header, $this->response) = explode("\r\n\r\n", $this->response, 2);
}
$this->response_headers = preg_split('/\r\n/', $response_header, null, PREG_SPLIT_NO_EMPTY);
Expand Down

0 comments on commit 236d89d

Please sign in to comment.