You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Patrick Galbraith <pa...@mysql.com> on 2006/11/28 21:31:56 UTC

reposting form values

Hi all,

Quick question - how does one do a repost (using POST, not GET) form 
values? This would be in a redirect  TransHandler.

Thanks much!

Patrick

-- 
Patrick Galbraith, Senior Systems Engineer 
MySQL AB, www.mysql.com

Satyam Eva Jayate - Truth Alone Triumphs
Mundaka Upanishad




Re: reposting form values

Posted by Torsten Foertsch <to...@gmx.net>.
On Tuesday 28 November 2006 22:37, Robert Landrum wrote:
> > On Tuesday 28 November 2006 21:31, Patrick Galbraith wrote:
> >> Quick question - how does one do a repost (using POST, not GET) form
> >> values? This would be in a redirect  TransHandler.
> >
> > Your only chance is to proxy the request to the other server. You cannot
> > use a Location header to trigger a POST.
>
> You could also pump out HTML and call form.submit() with Javascript.
> Other than that, Torsten is correct.  Use LWP to proxy the post data
> back to the client.

I would use mod_proxy for that, maybe in combination with an output filter. 
With LWP one is tempted to read the response in one chunk. This can bloat 
your private memory ...

mod_proxy reads the response in small chunks (8kbyte?) and passes them to the 
output filter chain one by one.

Torsten

Re: reposting form values

Posted by Robert Landrum <rl...@aol.net>.
Torsten Foertsch wrote:
> On Tuesday 28 November 2006 21:31, Patrick Galbraith wrote:
>> Quick question - how does one do a repost (using POST, not GET) form
>> values? This would be in a redirect  TransHandler.
> 
> Your only chance is to proxy the request to the other server. You cannot use a 
> Location header to trigger a POST.
> 

You could also pump out HTML and call form.submit() with Javascript. 
Other than that, Torsten is correct.  Use LWP to proxy the post data 
back to the client.

Rob

Re: reposting form values

Posted by Torsten Foertsch <to...@gmx.net>.
On Tuesday 28 November 2006 21:31, Patrick Galbraith wrote:
> Quick question - how does one do a repost (using POST, not GET) form
> values? This would be in a redirect  TransHandler.

Your only chance is to proxy the request to the other server. You cannot use a 
Location header to trigger a POST.

Torsten