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

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


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

Modified Files:
      Tag: release23-branch
	urllib.py 
Log Message:
[Backport of 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.158.6.1
diff -C2 -d -r1.158 -r1.158.6.1
*** urllib.py	16 May 2003 01:45:14 -0000	1.158
--- urllib.py	29 Aug 2003 18:13:11 -0000	1.158.6.1
***************
*** 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