pwsm / httplib2

Automatically exported from code.google.com/p/httplib2
0 stars 0 forks source link

Http.request() does not allow gzip encoded POST responses #104

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Lines 1018-1019 in httplib2.py (0.6.0):
if method in ["GET", "HEAD"] and 'range' not in headers and 'accept-encoding' 
not in headers:
    headers['accept-encoding'] = 'gzip, deflate'

Why is gzip/deflate support only limited to these methods? I have an app that 
does HTTP-based RPC and communicates exclusively through POST requests. With 
the current httplib2 code, I can't enable compressed responses which would 
enable considerable bandwidth savings.

The workaround of course is to set accept-encoding manually, but I just have to 
wonder why POST requests are excluded from compression.

Original issue reported on code.google.com by Dema...@gmail.com on 12 Jul 2010 at 3:30

GoogleCodeExporter commented 8 years ago
You should use pycurl,  it takes care of this issue transparently. 

Original comment by firealwa...@gmail.com on 13 Feb 2011 at 5:27

GoogleCodeExporter commented 8 years ago
And how do you propose I do that when I'm using Jython?

Original comment by Dema...@gmail.com on 13 Feb 2011 at 6:57

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 44b349a390.

Original comment by joe.gregorio@gmail.com on 14 Feb 2011 at 12:27

GoogleCodeExporter commented 8 years ago
Fixed in 159:44b349a39085.

Original comment by joe.gregorio@gmail.com on 14 Feb 2011 at 12:28