commit | c5d7e80739fdaed472955ca2d3d4933c27ab879b | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Mon Nov 11 19:01:17 1996 +0000 |
committer | Guido van Rossum <guido@python.org> | Mon Nov 11 19:01:17 1996 +0000 |
tree | 5032eb803e965344f726fbfad5033b6d315eac1c | |
parent | c384d7560e0e07fecf4ae0704408d846dddc9a39 [diff] [blame] |
Fix the way the Authorization header is sent (how could this have worked?).
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 @@ 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()