Fix the way the Authorization header is sent (how could this have worked?).

This commit is contained in:
Guido van Rossum 1996-11-11 19:01:17 +00:00
parent c384d7560e
commit c5d7e80739
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ class URLopener:
auth = None auth = None
h = httplib.HTTP(host) h = httplib.HTTP(host)
h.putrequest('GET', selector) 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) for args in self.addheaders: apply(h.putheader, args)
h.endheaders() h.endheaders()
errcode, errmsg, headers = h.getreply() errcode, errmsg, headers = h.getreply()