summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2003-08-29 18:12:23 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2003-08-29 18:12:23 (GMT)
commitff638ea6dbc7ff6819a083f9a9562a8099accade (patch)
tree31d3dfbb2f536a25bbe5c2a795e7c158f35d45f5 /Lib
parent77ad8292614d941bddc8894a89d3afe774df9a4b (diff)
downloadcpython-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')
-rw-r--r--Lib/urllib.py2
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()