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. I thought it may have been
due to the original post data being deleted because I use it, so I tried
using Request->instance instead of Request->new, but that made no
difference either. Is it actually possible to do it if I'm using the
Request object?

Cheers


Reply via email to