[Python-checkins] r53068 - python/trunk/Lib/urllib.py

andrew.kuchling python-checkins at python.org
Tue Dec 19 16:11:41 CET 2006


Author: andrew.kuchling
Date: Tue Dec 19 16:11:41 2006
New Revision: 53068

Modified:
   python/trunk/Lib/urllib.py
Log:
[Patch #1617413 from Dug Song] Fix HTTP Basic authentication via HTTPS

Modified: python/trunk/Lib/urllib.py
==============================================================================
--- python/trunk/Lib/urllib.py	(original)
+++ python/trunk/Lib/urllib.py	Tue Dec 19 16:11:41 2006
@@ -405,8 +405,8 @@
                 h.putheader('Content-Length', '%d' % len(data))
             else:
                 h.putrequest('GET', selector)
-            if proxy_auth: h.putheader('Proxy-Authorization: Basic %s' % proxy_auth)
-            if auth: h.putheader('Authorization: Basic %s' % auth)
+            if proxy_auth: h.putheader('Proxy-Authorization', 'Basic %s' % proxy_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()


More information about the Python-checkins mailing list