]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update client.py (GH-24827)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 13 Mar 2021 13:09:03 +0000 (05:09 -0800)
committerGitHub <noreply@github.com>
Sat, 13 Mar 2021 13:09:03 +0000 (05:09 -0800)
(cherry picked from commit b6884ad2688451dd3cbc5984b23da5840e1b6df8)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Lib/http/client.py

index 16afc871ea6d7a9dfcabfd6eec03cf69a84f7244..20a25de855625f950e50e2f0c7f12e3cfd510013 100644 (file)
@@ -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)