summaryrefslogtreecommitdiff
path: root/url.class
diff options
context:
space:
mode:
Diffstat (limited to 'url.class')
-rw-r--r--url.class2
1 files changed, 1 insertions, 1 deletions
diff --git a/url.class b/url.class
index 4f1118b..c94f4af 100644
--- a/url.class
+++ b/url.class
@@ -274,7 +274,7 @@ function get($p=null, $timeout=5000)
{
if (preg_match('#^(HTTP\S+)\s(\d+)#', $line, $parts)) # Parse result code
$url->headers[$parts[1]] = $url->result = $parts[2];
- elseif (preg_match('#^Location: (https?://[^/]*)?(/)?(.*)$#', $line, $parts) && ($parts[1] != $url->url)) # Handle redirects (supports relative and global)
+ elseif (preg_match('#^Location: (https?://[^/]*)?(/)?(.*)$#i', $line, $parts) && ($parts[1] != $url->url)) # Handle redirects (supports relative and global)
{
unset($p['url'], $p['headers']['Host']);
$url->it_url($parts[1] ? $parts[1].$parts[2].$parts[3] : $url->protocol.'://'.$url->realhostname.($parts[2] ? $parts[2].$parts[3] : '/'.dirname($url->path).'/'.$parts[3]));