mirror of https://github.com/python/cpython.git
[Bug #776542] open_https() generates a bad Authorization header because it calls .putheader() wrongly. Reported by Steffen Ries.
This commit is contained in:
parent
77ad829261
commit
ff638ea6db
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue