Re: follow redirect for wikipedia?
Daniel Stenberg <[email protected]>
| Newsgroups | gmane.comp.web.curl.php |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 8 Sep 2010, [email protected] wrote: > When I do this it ends up giving me back some binary code. Because wikipedia.org is not being nice. They provide the data with "Content-Encoding: gzip" meaning the data is compressed - without the client asking for it - so it needs to be uncompressed!! > Any suggestions on options for dealing with a redirect like this? (Those links aren't redirects at all.) You should enable libcurl's automatic decompression by using the CURLOPT_ENCODING option. -- / daniel.haxx.se _______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php