]> granicus.if.org Git - python/commitdiff
Fix the way the Authorization header is sent (how could this have worked?).
authorGuido van Rossum <guido@python.org>
Mon, 11 Nov 1996 19:01:17 +0000 (19:01 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 11 Nov 1996 19:01:17 +0000 (19:01 +0000)
Lib/urllib.py

index 99bed8f1cd7793353a75122dafc86d2b9c18e789..59b3274886f58ebad1c914eac04b486947b43085 100644 (file)
@@ -200,7 +200,7 @@ class URLopener:
                        auth = None
                h = httplib.HTTP(host)
                h.putrequest('GET', selector)
-               if auth: h.putheader('AuthorizationBasic %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()