[Python-checkins] python/dist/src/Lib urllib2.py,1.24.8.5,1.24.8.6
jhylton@users.sourceforge.net
jhylton@users.sourceforge.net
Sun, 04 May 2003 21:10:44 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv23057
Modified Files:
Tag: release22-maint
urllib2.py
Log Message:
Backport better fix for newurl as suggested by Jim Jewett in SF bug
#730963.
Index: urllib2.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/urllib2.py,v
retrieving revision 1.24.8.5
retrieving revision 1.24.8.6
diff -C2 -d -r1.24.8.5 -r1.24.8.6
*** urllib2.py 5 May 2003 03:18:41 -0000 1.24.8.5
--- urllib2.py 5 May 2003 04:10:40 -0000 1.24.8.6
***************
*** 407,411 ****
class HTTPRedirectHandler(BaseHandler):
! def redirect_request(self, req, fp, code, msg, headers):
"""Return a Request or None in response to a redirect.
--- 407,411 ----
class HTTPRedirectHandler(BaseHandler):
! def redirect_request(self, req, fp, code, msg, headers, newurl):
"""Return a Request or None in response to a redirect.
***************
*** 443,447 ****
# request, although that might interact poorly with other
# handlers that also use handler-specific request attributes
! new = self.redirect_request(req, fp, code, msg, headers)
if new is None:
return
--- 443,447 ----
# request, although that might interact poorly with other
# handlers that also use handler-specific request attributes
! new = self.redirect_request(req, fp, code, msg, headers, newurl)
if new is None:
return