[ python-Bugs-1568897 ] http redirect does not pass 'post' data

SourceForge.net noreply at sourceforge.net
Sun Oct 1 23:08:05 CEST 2006


Bugs item #1568897, was opened at 2006-10-02 10:08
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1568897&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: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: hans_moleman (hans_moleman)
Assigned to: Nobody/Anonymous (nobody)
Summary: http redirect does not pass 'post' data

Initial Comment:
A HTTP(S) redirect does not pass POST 'data'.

Currently:
If a redirect is required, a new Request is created
with a URL that the redirect response has provided.
This new Request has the original headers.

Required:
For the new Request the data too will be copied from
the original Request.

I believe the following one line change is required in
'urllib2.HTTPRedirectHandler.redirect_request':

<code>
return Request(url     = newurl,
               headers = req.headers,
               data    = req.data,
               ...
</code>

Environment: Linux
Python 2.5

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

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


More information about the Python-bugs-list mailing list