Haxx ad

curl's project page on


cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[ curl-Bugs-3417819 ] Fails on Content-Encoding: deflate

From: <>
Date: Wed, 22 Feb 2012 23:32:01 -0800

Bugs item #3417819, was opened at 2011-10-03 04:40
Message generated for change (Settings changed) made by bagder
You can respond by visiting:

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: http
Group: wrong content
>Status: Closed
Resolution: Works For Me
Priority: 5
Private: No
Submitted By: cnd (vradd)
Assigned to: Daniel Stenberg (bagder)
Summary: Fails on Content-Encoding: deflate

Initial Comment:
Both of these don't grock the file. IE8 reads it with no problems. Example is attached

curl 7.22.0 (x86_64-unknown-linux-gnu) libcurl/7.19.7 NSS/ zlib/1.2.3 libidn/1.18 libssh2/1.2.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz

curl 7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz


Comment By: Daniel Stenberg (bagder)
Date: 2011-10-15 07:33

Thanks for reporting this issue and helping us improve curl and libcurl.

We're awaiting feedback in this issue. Due to this, I have set the state of
this issue to pending and it will automatically get closed later on unless
we get further info.

Please consider answering the outstanding questions or providing the
missing info so that we can proceed to resolve this issue!


Comment By: Daniel Stenberg (bagder)
Date: 2011-10-04 02:59

I tried your exact dump and put it in a curl test case. It managed to
unpack the data just fine when I used my development version:

curl 7.23.0-DEV (i686-pc-linux-gnu) libcurl/7.23.0-DEV OpenSSL/1.0.0e
zlib/ c-ares/1.7.6-DEV libidn/1.22 libssh2/1.4.0_DEV librtmp/2.2e

As nothing has changed in the uncompression code in a fairly long time, I
suspect this might be related to my newer libz version. Any chance you can
try upgrading that?

(The test case I produced to test this doesn't quite work in other aspects
though since the test server has problems with the HTML tags in the test
file so it's not something I'd like to share with the world)


Comment By: cnd (vradd)
Date: 2011-10-03 15:36

The attached file is what curl actually returned - it has failed to inflate
the deflated data, and outputted gibberish instead of HTML.
If you serve the attached from a web server (eg: using Apache's ASIS
module, or simply by writing a script to listen on port 80 and return the
attached file in its entirety) you will notice:
A) Curl still returnes the binary data
B) Internet explorer _correctly_ inflates it and returns the HTML
*) Yes - I've done those 2 above tests on the _actual file attached_ for

Here was the actual request that yeilded the attached file (not sure if the
proxy in use is still up right now though) - although be aware that I
deleted the "Transfer-Encoding: chunked" from the HTTP headers in the file
before uploading it to you (curl already un-chunked the contents

curl -x -i -L -m 60 --header "Accept:
application/x-ms-application, image/jpeg, application/xaml+xml, image/gif,
image/pjpeg, application/x-ms-xbap, application/,
 application/, application/msword, */*" --header "Referer:" --header "Accept-Language: en-AU" --header
"User-Agent: Mozilla/4.0 (compatible; MSIE 8.0;
 Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50723; .NET CLR
3.5.30724; .NET CLR 3.0.30727; Media Center PC 6.0; .NET4.0C; InfoPath.3)"
--header "Accept-Encoding: deflate" -s www.v

I'm not aware of any switch I'm supposed to provide to tell curl to
automatically uncompress binary data. If any such thing already exists, it
would need to be added to your "curl --help" system, and probably
programmed so that decompressing is the default automatic behaviour.

FYI - all browsers I've tested will automaticlly uncompress gzip/deflate
content, regardless of whether or not the browser advertises that it's
capable of doing so or solicits such content.


Comment By: Daniel Stenberg (bagder)
Date: 2011-10-03 14:40

What exactly does "don't grock the file" mean? What happens?


You can respond by visiting:
Received on 2012-02-23

These mail archives are generated by hypermail.

donate! Page updated January 05, 2012.
web site info

File upload with ASP.NET