Fixing the way to follow redirects when fetching XML files.

See: 689745d705
This commit is contained in:
Renan Gonçalves 2013-01-18 12:27:43 +01:00
parent 7790bcacff
commit 76fe9f8787

View file

@ -101,7 +101,7 @@ class Xml {
} 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.'));