Include leading slash when checking for HTTP-Version field (RFC 2616 § 3.1)

This commit is contained in:
Zach Borboa
2014-04-28 19:50:24 -07:00
parent aa71e75cea
commit b84acca6b1
+1 -1
View File
@@ -285,7 +285,7 @@ class Curl
if (!(strpos($response, "\r\n\r\n") === false)) {
$response_array = explode("\r\n\r\n", $response);
for ($i = count($response_array) - 1; $i >= 0; $i--) {
if (stripos($response_array[$i], 'HTTP') === 0) {
if (stripos($response_array[$i], 'HTTP/') === 0) {
$response_header = $response_array[$i];
$response = implode("\r\n\r\n", array_splice($response_array, $i + 1));
break;