Kaydet (Commit) ff638ea6 authored tarafından Andrew M. Kuchling's avatar Andrew M. Kuchling

[Bug #776542] open_https() generates a bad Authorization header because it calls…

[Bug #776542] open_https() generates a bad Authorization header because it calls .putheader() wrongly.  Reported by Steffen Ries.
üst 77ad8292
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment