[mod_python] POST redirect

Hugh Warringoton hjmw2 at cam.ac.uk
Fri Feb 18 17:56:24 EST 2005

Hi there,

I'm trying to redirect people to a POST request on a page external to my site. 
Specifically, I want to emulate the behaviour as if somebody had submitted 
the following form:

<form name="_xclick" target="_blank" 
action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="hughshop">
<input type="hidden" name="display" value="1">

I can think of a way of doing this: using mod_python.util.redirect(req, 
'https//...'). However it seems I will need to manually construct the req 
object - specifically, fill a FieldStorage class so that it looks like the 
user has submitted the above <form>. Is this a sane way of doing things, or 

Any thoughts would be appreciated.

More information about the Mod_python mailing list