From: Andrew M. Kuchling Date: Tue, 19 Dec 2006 15:12:23 +0000 (+0000) Subject: [Patch #1617413 from Dug Song] Fix HTTP Basic authentication via HTTPS X-Git-Tag: v2.5.1c1~213 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0faf90acc43484c934e816bb675bca0007d31c17;p=thirdparty%2FPython%2Fcpython.git [Patch #1617413 from Dug Song] Fix HTTP Basic authentication via HTTPS --- diff --git a/Lib/urllib.py b/Lib/urllib.py index 064632c260b3..4a1fa64bb402 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -405,8 +405,8 @@ class URLopener: h.putheader('Content-Length', '%d' % len(data)) else: h.putrequest('GET', selector) - if proxy_auth: h.putheader('Proxy-Authorization: Basic %s' % proxy_auth) - if auth: h.putheader('Authorization: Basic %s' % auth) + if proxy_auth: h.putheader('Proxy-Authorization', 'Basic %s' % proxy_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()