mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[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
1 changed files with 1 additions and 1 deletions
|
@ -369,7 +369,7 @@ class URLopener:
|
|||
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…
Add table
Add a link
Reference in a new issue