From: Guido van Rossum Date: Mon, 11 Nov 1996 19:01:17 +0000 (+0000) Subject: Fix the way the Authorization header is sent (how could this have worked?). X-Git-Tag: v1.5a1~944 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5d7e80739fdaed472955ca2d3d4933c27ab879b;p=python Fix the way the Authorization header is sent (how could this have worked?). --- diff --git a/Lib/urllib.py b/Lib/urllib.py index 99bed8f1cd..59b3274886 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()