From c5d7e80739fdaed472955ca2d3d4933c27ab879b Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 11 Nov 1996 19:01:17 +0000 Subject: [PATCH] Fix the way the Authorization header is sent (how could this have worked?). --- Lib/urllib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/urllib.py b/Lib/urllib.py index 99bed8f1cd7..59b3274886f 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -200,7 +200,7 @@ class URLopener: auth = None h = httplib.HTTP(host) h.putrequest('GET', selector) - if auth: h.putheader('Authorization: Basic %s' % auth) + if auth: h.putheader('Authorization', 'Basic %s' % auth) for args in self.addheaders: apply(h.putheader, args) h.endheaders() errcode, errmsg, headers = h.getreply()