]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Update client.py (GH-24827)
authorGéry Ogam <gery.ogam@gmail.com>
Sat, 13 Mar 2021 12:22:03 +0000 (13:22 +0100)
committerGitHub <noreply@github.com>
Sat, 13 Mar 2021 12:22:03 +0000 (04:22 -0800)
Lib/http/client.py

index b339f20fc957a08432c3e5720c5e0889d835e05a..c526380dcabfc95bf8c6cd3f525d4c831dd6eb1f 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)