[Python-checkins] python/dist/src/Lib urllib.py,1.158,1.159

akuchling at users.sourceforge.net akuchling at users.sourceforge.net
Fri Aug 29 12:12:26 EDT 2003


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv3152

Modified Files:
	urllib.py 
Log Message:
[Bug #776542] open_https() generates a bad Authorization header because it calls .putheader() wrongly.  Reported by Steffen Ries.

Index: urllib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib.py,v
retrieving revision 1.158
retrieving revision 1.159
diff -C2 -d -r1.158 -r1.159
*** urllib.py	16 May 2003 01:45:14 -0000	1.158
--- urllib.py	29 Aug 2003 18:12:23 -0000	1.159
***************
*** 370,374 ****
              else:
                  h.putrequest('GET', selector)
!             if auth: h.putheader('Authorization: Basic %s' % auth)
              if realhost: h.putheader('Host', realhost)
              for args in self.addheaders: h.putheader(*args)
--- 370,374 ----
              else:
                  h.putrequest('GET', selector)
!             if auth: h.putheader('Authorization', 'Basic %s' % auth)
              if realhost: h.putheader('Host', realhost)
              for args in self.addheaders: h.putheader(*args)





More information about the Python-checkins mailing list