diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-02-26 16:50:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-26 16:50:11 +0200 |
commit | 3f2e6f15d64d81633b1fc0b308afc0d6e9026b61 (patch) | |
tree | 47fc15490c06e8d49f0750e8aa75352ef17cfc7c /Lib/urllib | |
parent | 6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e (diff) | |
download | cpython-git-3f2e6f15d64d81633b1fc0b308afc0d6e9026b61.tar.gz |
Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624)
Diffstat (limited to 'Lib/urllib')
-rw-r--r-- | Lib/urllib/request.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/urllib/request.py b/Lib/urllib/request.py index 2b769421c5..5b962f7dc2 100644 --- a/Lib/urllib/request.py +++ b/Lib/urllib/request.py @@ -1286,7 +1286,8 @@ class AbstractHTTPHandler(BaseHandler): h.set_debuglevel(self._debuglevel) headers = dict(req.unredirected_hdrs) - headers.update((k, v) for k, v in req.headers.items() if k not in headers) + headers.update({k: v for k, v in req.headers.items() + if k not in headers}) # TODO(jhylton): Should this be redesigned to handle # persistent connections? |