From 9f935fabab36ec1a94f7dab828f5bb48300994d2 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Sat, 13 Mar 2021 05:09:03 -0800 Subject: [PATCH] Update client.py (GH-24827) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit (cherry picked from commit b6884ad2688451dd3cbc5984b23da5840e1b6df8) Co-authored-by: Géry Ogam --- Lib/http/client.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/Lib/http/client.py b/Lib/http/client.py index 16afc871ea6d..20a25de85562 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) -- 2.47.3