diff options
author | Guido van Rossum <guido@python.org> | 1996-11-11 19:01:17 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-11-11 19:01:17 (GMT) |
commit | c5d7e80739fdaed472955ca2d3d4933c27ab879b (patch) | |
tree | 5032eb803e965344f726fbfad5033b6d315eac1c /Lib/urllib.py | |
parent | c384d7560e0e07fecf4ae0704408d846dddc9a39 (diff) | |
download | cpython-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.py | 2 |
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() |