diff --git a/Lib/urllib.py b/Lib/urllib.py index 494f578ec60..5449104bf7a 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -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()