Skip to content

Commit

Permalink
Merge pull request #73 from mishak87/patch-4
Browse files Browse the repository at this point in the history
Parsing HTTP Code according to RFC
  • Loading branch information
nategood committed Mar 5, 2013
2 parents 1f91089 + 197c9d5 commit 8b24b79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Httpful/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function _parseHeaders($headers)

public function _parseCode($headers)
{
$parts = explode(' ', substr($headers, 0, strpos($headers, "\n")));
$parts = explode(' ', substr($headers, 0, strpos($headers, "\r\n")));
if (count($parts) < 2 || !is_numeric($parts[1])) {
throw new \Exception("Unable to parse response code from HTTP response due to malformed response");
}
Expand Down

0 comments on commit 8b24b79

Please sign in to comment.