diff --git a/src/Httpful/Request.php b/src/Httpful/Request.php index 563728c..984e784 100644 --- a/src/Httpful/Request.php +++ b/src/Httpful/Request.php @@ -1053,7 +1053,11 @@ public function buildResponse($result) { $result = preg_replace($proxy_regex, '', $result); } - $response = explode("\r\n\r\n", $result, 2 + $info['redirect_count']); + $line_feed = "\r\n\r\n"; + if (strpos($result, $line_feed) === false) { + $line_feed = "\n\n"; + } + $response = explode($line_feed, $result, 2 + $info['redirect_count']); $body = array_pop($response); $headers = array_pop($response);