]> 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 12:44:36 +0000 (04:44 -0800)
committerGitHub <noreply@github.com>
Sat, 13 Mar 2021 12:44:36 +0000 (04:44 -0800)
(cherry picked from commit b6884ad2688451dd3cbc5984b23da5840e1b6df8)

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

index a96fd5ebb2e86df92a094fdd2e50c32aa6e8a77e..df417cf65e204333317d7da91e9ea1563d88dee7 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)