cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

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

From: SourceForge.net <noreply_at_sourceforge.net>
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:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3417819&group_id=976

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/3.12.8.0 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

Message:
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

Message:
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/1.2.3.4 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

Message:
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
you.

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
correctly):-

curl -x 109.123.70.47:80 -i -L -m 60 --header "Accept:
application/x-ms-application, image/jpeg, application/xaml+xml, image/gif,
image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel,
 application/vnd.ms-powerpoint, application/msword, */*" --header "Referer:
http://www.vidproxy.com/" --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
worker.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=492589

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

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

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=3417819&group_id=976
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