mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-31 12:43:14 +00:00
Include leading slash when checking for HTTP-Version field (RFC 2616 § 3.1)
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user