]> granicus.if.org Git - python/commitdiff
[Bug #776542] open_https() generates a bad Authorization header because it calls...
authorAndrew M. Kuchling <amk@amk.ca>
Fri, 29 Aug 2003 18:12:23 +0000 (18:12 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Fri, 29 Aug 2003 18:12:23 +0000 (18:12 +0000)
Lib/urllib.py

index 494f578ec60f5b14c4908b8dfd69a1838ddea303..5449104bf7adb0dda16145318ef8627857cc6c12 100644 (file)
@@ -369,7 +369,7 @@ class URLopener:
                 h.putheader('Content-length', '%d' % len(data))
             else:
                 h.putrequest('GET', selector)
-            if auth: h.putheader('AuthorizationBasic %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()