[Bug #776542] open_https() generates a bad Authorization header because it calls .putheader() wrongly. Reported by Steffen Ries.

This commit is contained in:
Andrew M. Kuchling 2003-08-29 18:12:23 +00:00
parent 77ad829261
commit ff638ea6db
1 changed files with 1 additions and 1 deletions

View File

@ -369,7 +369,7 @@ def open_https(self, url, data=None):
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()