Merge pull request #1385 from mexon/mat/caseheaders
Accept lowercase location header
This commit is contained in:
commit
d4e93ee9b4
1 changed files with 1 additions and 1 deletions
|
@ -94,7 +94,7 @@ function fetch_url($url,$binary = false, &$redirects = 0, $timeout = 0, $accept_
|
||||||
$newurl = $new_location_info["scheme"]."://".$new_location_info["host"].$old_location_info["path"];
|
$newurl = $new_location_info["scheme"]."://".$new_location_info["host"].$old_location_info["path"];
|
||||||
|
|
||||||
$matches = array();
|
$matches = array();
|
||||||
if (preg_match('/(Location:|URI:)(.*?)\n/', $header, $matches)) {
|
if (preg_match('/(Location:|URI:)(.*?)\n/i', $header, $matches)) {
|
||||||
$newurl = trim(array_pop($matches));
|
$newurl = trim(array_pop($matches));
|
||||||
}
|
}
|
||||||
if(strpos($newurl,'/') === 0)
|
if(strpos($newurl,'/') === 0)
|
||||||
|
|
Loading…
Reference in a new issue