From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 13 Mar 2021 12:44:36 +0000 (-0800) Subject: Update client.py (GH-24827) X-Git-Tag: v3.9.3~46 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=53ab4af4444a01ef3848e49278a0b46c8f9e99cf;p=thirdparty%2FPython%2Fcpython.git Update client.py (GH-24827) (cherry picked from commit b6884ad2688451dd3cbc5984b23da5840e1b6df8) Co-authored-by: Géry Ogam --- diff --git a/Lib/http/client.py b/Lib/http/client.py index a96fd5ebb2e8..df417cf65e20 100644 --- a/Lib/http/client.py +++ b/Lib/http/client.py @@ -349,9 +349,6 @@ class HTTPResponse(io.BufferedIOBase): # NOTE: RFC 2616, S4.4, #3 says we ignore this if tr_enc is "chunked" self.length = None length = self.headers.get("content-length") - - # are we using the chunked-style of transfer encoding? - tr_enc = self.headers.get("transfer-encoding") if length and not self.chunked: try: self.length = int(length)