[Patches] [ python-Patches-1515745 ] urllib2 redirection fix

SourceForge.net noreply at sourceforge.net
Tue Jul 11 15:37:09 CEST 2006


Patches item #1515745, was opened at 2006-07-02 07:35
Message generated for change (Comment added) made by jjlee
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1515745&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Petr Gladkikh (batyi)
Assigned to: Nobody/Anonymous (nobody)
Summary: urllib2 redirection fix

Initial Comment:
When redirecting to a new URL, new request is missing
attached data (e.g. when redirecting POST or PUT). Thus
redirected request will be different than original one. 

The patch fixes this problem.


My environment is:
OS: WindowsXP, 
Python version: ActivePython 2.4.2 Build 10
(ActiveState Corp.) based on Python 2.4.2 (#67, Jan 17
2006, 15:36:03) [MSC v.1310 32 bit (Intel)] on win32


----------------------------------------------------------------------

Comment By: John J Lee (jjlee)
Date: 2006-07-11 14:37

Message:
Logged In: YES 
user_id=261020

Jim's right that there's no bug here.

Also, it already is optional if you're prepared to subclass
or reimplement HTTPRedirectHandler.  Method redirect_request
is documented and can do whatever you like.

This issue was discussed at length here:

http://python.org/sf/549151

Could somebody close this patch?


----------------------------------------------------------------------

Comment By: Jim Jewett (jimjjewett)
Date: 2006-07-03 03:10

Message:
Logged In: YES 
user_id=764593

With a POST (and presumably a PUT), this is required by the 
standard.  I won't argue that it is sensible (why would you 
send the data to someone whose redirects you don't trust), 
but it is the standard.

Making this a settable option would probably be OK, though.

-jJ


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1515745&group_id=5470


More information about the Patches mailing list