Skip to content

Commit

Permalink
Fixing the way to follow redirects when fetching XML files.
Browse files Browse the repository at this point in the history
See: 689745d
  • Loading branch information
renan committed Jan 18, 2013
1 parent 7790bca commit 76fe9f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Xml.php
Expand Up @@ -101,7 +101,7 @@ public static function build($input, $options = array()) {
} elseif (file_exists($input)) {
return self::_loadXml(file_get_contents($input), $options);
} elseif (strpos($input, 'http://') === 0 || strpos($input, 'https://') === 0) {
$socket = new HttpSocket(array('redirect' => 10));
$socket = new HttpSocket(array('request' => array('redirect' => 10)));
$response = $socket->get($input);
if (!$response->isOk()) {
throw new XmlException(__d('cake_dev', 'XML cannot be read.'));
Expand Down

0 comments on commit 76fe9f8

Please sign in to comment.