From ff638ea6dbc7ff6819a083f9a9562a8099accade Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Fri, 29 Aug 2003 18:12:23 +0000 Subject: [Bug #776542] open_https() generates a bad Authorization header because it calls .putheader() wrongly. Reported by Steffen Ries. --- Lib/urllib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/urllib.py b/Lib/urllib.py index 494f578..5449104 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -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() -- cgit v0.12