Issue 901:

Make value of Contents-Encoding header case insensitive per RFC 2616.
This commit is contained in:
mmartin
2012-10-19 14:17:32 -05:00
parent a74c6c6314
commit 4dfa51ae03
+3 -2
View File
@@ -454,9 +454,10 @@ def stream_decompress(iterator, mode='gzip'):
def stream_untransfer(gen, resp):
if 'gzip' in resp.headers.get('content-encoding', ''):
ce = resp.headers.get('content-encoding', '').lower()
if 'gzip' in ce:
gen = stream_decompress(gen, mode='gzip')
elif 'deflate' in resp.headers.get('content-encoding', ''):
elif 'deflate' in ce:
gen = stream_decompress(gen, mode='deflate')
return gen