Skip to content
Myr

Issue 901:

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Make value of Contents-Encoding header case insensitive per RFC 2616.

authored by mmartin · committed by mmartin · parent a74c6c6 · Browse files · 1 file+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−2 removed

  • other:+3 added−2 removed

1 file+3 added−2 removed

modified:requests/utils.py+3 added-2 removed
452 unmodified lines
453 yield rv454455456def stream_untransfer(gen, resp):457 if 'gzip' in resp.headers.get('content-encoding', ''):457 ce = resp.headers.get('content-encoding', '').lower()458 if 'gzip' in ce:459 gen = stream_decompress(gen, mode='gzip')459 elif 'deflate' in resp.headers.get('content-encoding', ''):460 elif 'deflate' in ce:461 gen = stream_decompress(gen, mode='deflate')462463 return gen464
117 unmodified lines