summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-11-11 19:01:17 (GMT)
committerGuido van Rossum <guido@python.org>1996-11-11 19:01:17 (GMT)
commitc5d7e80739fdaed472955ca2d3d4933c27ab879b (patch)
tree5032eb803e965344f726fbfad5033b6d315eac1c /Lib/urllib.py
parentc384d7560e0e07fecf4ae0704408d846dddc9a39 (diff)
downloadcpython-c5d7e80739fdaed472955ca2d3d4933c27ab879b.zip
cpython-c5d7e80739fdaed472955ca2d3d4933c27ab879b.tar.gz
cpython-c5d7e80739fdaed472955ca2d3d4933c27ab879b.tar.bz2
Fix the way the Authorization header is sent (how could this have worked?).
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r--Lib/urllib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index 99bed8f..59b3274 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -200,7 +200,7 @@ class URLopener:
auth = None
h = httplib.HTTP(host)
h.putrequest('GET', selector)
- if auth: h.putheader('Authorization: Basic %s' % auth)
+ if auth: h.putheader('Authorization', 'Basic %s' % auth)
for args in self.addheaders: apply(h.putheader, args)
h.endheaders()
errcode, errmsg, headers = h.getreply()