Message17311
When opening an https page which requires
authentication, the "Authorization" header is created
incorrectly by open_https(). open_http() uses the
correct method.
The fix is a simple one line change:
*** /usr/local/lib/python2.2/urllib.py Fri Oct 4
18:57:01 2002
--- urllib.py Wed Jul 23 17:23:41 2003
***************
*** 364,370 ****
h.putheader('Content-length', '%d' %
len(data))
else:
h.putrequest('GET', selector)
! if auth: h.putheader('Authorization:
Basic %s' % auth)
if realhost: h.putheader('Host', realhost)
for args in self.addheaders:
apply(h.putheader, args)
h.endheaders()
--- 364,370 ----
h.putheader('Content-length', '%d' %
len(data))
else:
h.putrequest('GET', selector)
! if auth: h.putheader('Authorization',
'Basic %s' % auth)
if realhost: h.putheader('Host', realhost)
for args in self.addheaders:
apply(h.putheader, args)
h.endheaders()
|
|
Date |
User |
Action |
Args |
2007-08-23 14:15:14 | admin | link | issue776542 messages |
2007-08-23 14:15:14 | admin | create | |
|