Ken Y. Clark <[EMAIL PROTECTED]> wrote:
> On Mon, 24 Jun 2002, Kirk Bowe wrote:
>> Hi all, my content handler does some work with POSTed data, and at
>> the end wants to redirect to a totally unrelated server, preserving
>> the POST data that the client originally sent, so that the
>> unrelated server can do its own further processing with its own
>> mod_perl, cgi, or whatever.
>>
>> I can't get it to work, as I think I'm getting confused by some
>> pre-Apache::Request hints that I've seen for this. This is the mess
>> I've got so far (condensed):
>>
>> sub handler
>> {
>> my $r = Apache::Request->new(shift);
>>
>> ... some calls to other subs here to do work ...
>>
>> $r->method("POST");
>> $r->method_number(M_POST);
>> $r->headers_in->unset("Content-length");
>> $r->args($content);
>> $r->header_out('Location' => "http://j.random.server.com/foo.cgi";);
>> $r->status(REDIRECT);
>> $r->send_http_header;
>>
>> return REDIRECT;
>> }
>>
>> It redirects, but doesn't pass the POST data.

It can't, because this is the browsers job. Your script doesn't make a
connection the other server. You have to do transparent proxying or
depend on the browser.
> 
> I think this is what you want:
> 
> 
>http://theoryx5.uwinnipeg.ca/cgi-bin/guide-filter?page=snippets/Redirect_a_POST_Request_Forward.html;query=GET%20POST;match=and;where=all;stem=no

Host not found...

   --Nikolaus

Reply via email to