changeset 30232:dfbd28112e09 legacy-trunk

[Bug #776542] open_https() generates a bad Authorization header because it calls .putheader() wrongly. Reported by Steffen Ries.
author Andrew M. Kuchling <amk@amk.ca>
date Fri, 29 Aug 2003 18:12:23 +0000
parents dd451a63f89e
children c47f5ac8b06d
files Lib/urllib.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Lib/urllib.py	Fri Aug 29 17:49:26 2003 +0000
+++ b/Lib/urllib.py	Fri Aug 29 18:12:23 2003 +0000
@@ -369,7 +369,7 @@
                 h.putheader('Content-length', '%d' % len(data))
             else:
                 h.putrequest('GET', selector)
-            if auth: h.putheader('Authorization: Basic %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()