diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2003-08-29 18:12:23 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2003-08-29 18:12:23 (GMT) |
commit | ff638ea6dbc7ff6819a083f9a9562a8099accade (patch) | |
tree | 31d3dfbb2f536a25bbe5c2a795e7c158f35d45f5 /Lib/urllib.py | |
parent | 77ad8292614d941bddc8894a89d3afe774df9a4b (diff) | |
download | cpython-ff638ea6dbc7ff6819a083f9a9562a8099accade.zip cpython-ff638ea6dbc7ff6819a083f9a9562a8099accade.tar.gz cpython-ff638ea6dbc7ff6819a083f9a9562a8099accade.tar.bz2 |
[Bug #776542] open_https() generates a bad Authorization header because it calls .putheader() wrongly. Reported by Steffen Ries.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r-- | Lib/urllib.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index 494f578..5449104 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -369,7 +369,7 @@ class URLopener: h.putheader('Content-length', '%d' % len(data)) else: h.putrequest('GET', selector) - if auth: h.putheader('Authorization: Basic %s' % auth) + if auth: h.putheader('Authorization', 'Basic %s' % auth) if realhost: h.putheader('Host', realhost) for args in self.addheaders: h.putheader(*args) h.endheaders() |