[Python-checkins] Update client.py (GH-24827)

miss-islington webhook-mailer at python.org
Sat Mar 13 07:44:40 EST 2021


https://github.com/python/cpython/commit/53ab4af4444a01ef3848e49278a0b46c8f9e99cf
commit: 53ab4af4444a01ef3848e49278a0b46c8f9e99cf
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-03-13T04:44:36-08:00
summary:

Update client.py (GH-24827)

(cherry picked from commit b6884ad2688451dd3cbc5984b23da5840e1b6df8)

Co-authored-by: Géry Ogam <gery.ogam at gmail.com>

files:
M Lib/http/client.py

diff --git a/Lib/http/client.py b/Lib/http/client.py
index a96fd5ebb2e86..df417cf65e204 100644
--- a/Lib/http/client.py
+++ b/Lib/http/client.py
@@ -349,9 +349,6 @@ def begin(self):
         # 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)



More information about the Python-checkins mailing list