Bugs item #1568897, was opened at 2006-10-01 23:08 Message generated for change (Comment added) made by calvin 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 ---------------------------------------------------------------------- Comment By: Wummel (calvin) Date: 2006-10-02 11:14 Message: Logged In: YES user_id=9205 Automatic redirects are only allowed for GET and HEAD[1]. Sending POST data automatically to other hosts than the original one is a security flaw. [1] http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3 So I think the current behaviour of urllib2 is correct, and should not be changed. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1568897&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com