From 35f235b3f92e76862f5abd7806ca045fff887739 Mon Sep 17 00:00:00 2001 From: ozh Date: Tue, 11 Feb 2014 08:14:48 +0100 Subject: [PATCH] Test AND, not OR --- library/Requests.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Requests.php b/library/Requests.php index 2289279d6..afeff666b 100755 --- a/library/Requests.php +++ b/library/Requests.php @@ -595,7 +595,7 @@ protected static function parse_response($headers, $url, $req_headers, $req_data } $options['redirected']++; $location = $return->headers['location']; - if (strpos ($location, 'http://') !== 0 || strpos ($location, 'https://') !== 0) { + if (strpos ($location, 'http://') !== 0 && strpos ($location, 'https://') !== 0) { // relative redirect, for compatibility make it absolute $location = Requests_IRI::absolutize($url, $location); $location = $location->uri;