Skip to content

Commit

Permalink
Shortened description
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr-cz committed Sep 6, 2014
1 parent d181d9d commit 5f48a7e
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions libraries/joomla/http/transport/socket.php
Expand Up @@ -144,12 +144,7 @@ public function request($method, JUri $uri, $data = null, array $headers = null,

$content = $this->getResponse($content);

/* Wikipedia says: A user agent should not automatically redirect a request more than five times,
* since such redirections usually indicate an infinite loop
*
* However JHttpTransportCurl doesn't set CURLOPT_MAXREDIRS, JHttpTransportStream uses max_redirects default 20
* so let's rely on severs' sanity :D
*/
// Follow Http redirects
if ($content->code >= 301 && $content->code < 400 && isset($content->headers['Location']))
{
return $this->request($method, new JUri($content->headers['Location']), $data, $headers, $timeout, $userAgent);
Expand Down Expand Up @@ -321,5 +316,4 @@ public static function isSupported()
{
return function_exists('fsockopen') && is_callable('fsockopen');
}

}

0 comments on commit 5f48a7e

Please sign in to comment.