New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion to implement transparent gzip decompression. #42
Comments
Additional info: Sorry, I forgot to provide an example...
Then you can retrieve a document as usual.
The document is transferred with gzip compressed.
And you can read the content without knowing it is compressed or not.
Regards, |
Added transparent_gzip_decompression property. closed by 95964f1. Applied a patch from Teshootub7. With setting All you need to use "transparent gzip decompression" is done by: clnt.transparent_gzip_decompression = true Then you can retrieve a document as usual. res = clnt.get("http://www.debian.org/") The document is transferred with gzip compressed. res.header["Content-Encoding"] And you can read the content without knowing it is compressed or not. |
Motivation: httpclient support gzip compression since late 2010 (see nahi/httpclient#42 ).
Hi,
I think it would be great if httpclient support gzip decompression because it is
widely used on many websites and reduces network traffics dramatically.
So I made a small patch to support gzip decompression on httpclient.
https://gist.github.com/702845
This patch adds a "transparent_gzip_decompression" attribute to HTTPClient. It is set to false by default for backward compatibility. With setting true to this attribute:
Test cases for this change is also included in the patch.
Regards,
The text was updated successfully, but these errors were encountered: