2
I made two http calls to the same gzipped resource from two different machines - RHEL and OSX.
curl http://example.com/file.gz
The first call returned an expected binary output:
/�IQ���}
The second call returned the content:
Hello, world!
The same phenomenon happened with wget
- binary response from the RHEL machine, plaintext from the OSX one.
Could OSX be auto-opening my resource implicitly? Can I override these settings?
Thanks, that was it. Any idea how to disable? – Adam Matan – 2013-06-13T13:25:22.837
@AdamMatan not really, don't have a mac and my wget does not do this. You could try piping it through gzip:
curl foo.gz | gzip > foo.gz
. – terdon – 2013-06-13T13:30:39.0201@AdamMatan: I cannot test either... although my
curl -V
indicates thatzlib
is active, I doesn't gunzip automatically. But perhaps the--raw
switch will help you: When used, it disables all internal HTTP decoding of content or transfer encodings and instead makes them passed on unaltered, raw. (Added in 7.16.2) – mpy – 2013-06-13T13:48:09.930