Permalink
Browse files

Fixing the way to follow redirects when fetching XML files.

See: 689745d
  • Loading branch information...
renan committed Jan 18, 2013
1 parent 7790bca commit 76fe9f8787fdc89c172030c6f24cb6f6d69d61cb
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Cake/Utility/Xml.php
View
@@ -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.'));

0 comments on commit 76fe9f8

Please sign in to comment.