diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-02-26 14:50:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-26 14:50:11 (GMT) |
commit | 3f2e6f15d64d81633b1fc0b308afc0d6e9026b61 (patch) | |
tree | 47fc15490c06e8d49f0750e8aa75352ef17cfc7c /Lib/urllib/request.py | |
parent | 6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e (diff) | |
download | cpython-3f2e6f15d64d81633b1fc0b308afc0d6e9026b61.zip cpython-3f2e6f15d64d81633b1fc0b308afc0d6e9026b61.tar.gz cpython-3f2e6f15d64d81633b1fc0b308afc0d6e9026b61.tar.bz2 |
Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624)
Diffstat (limited to 'Lib/urllib/request.py')
-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 2b76942..5b962f7 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? |