[Mediawiki-l] Http::get() fails on some URLs
Yaron Koren
yaron57 at gmail.com
Sun Mar 15 15:51:17 UTC 2009
Hi,
My extension External Data uses Http::get() to retrieve the contents of a
URL. Unfortunately, it turns out that this function fails on some URLs,
returning an HTTP return code of "0". Here's an example of a URL for which
it doesn't work:
http://mouse.brain-map.org/GeneExpression/Hippocampal+region/1.xml
Http::get() uses PHP's cURL library when possible (and on my server, it's
possible), and I assume that's what's causing the problem: when I replace
the call to Http::get() with a call to file_get_contents(), it works fine.
Does anyone know what the exact problem is? (It might be related to the fact
that the page is in XML format, although other XML pages work.) Should I
just use file_get_contents() instead?
Thanks,
Yaron
More information about the MediaWiki-l
mailing list