The transparent gzip Content-Encoding support should be done at the
http.client level code.
Before adding this feature, a question needs to be sorted out.
If we support the transparent gzip and wrap the file pointer to a
GzipFile filepointer, should reset the Content-Length value?
What if a user of urllib is relying on the Content-Length of response
to do something further?
I observed that google-chrome returns the uncompressed output (which
is correct for a browser), but has the Content-Length set the
compressed output length. |