perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Beberle <>
Subject [mp2] how to redirect POST data
Date Mon, 13 Dec 2004 10:43:35 GMT

I found a similar question posted in the newsgroups
but no one seemed to have a solution.  Here's what I'm
trying to do.  I have a web page that does a POST to a
remote server.  Basiscally, I'm trying to read the
post data and if it matches a regex, I want to
redirect it.  Otherwise, I want to let the POST
continue normally (submitting to the remote server).  

At the PerlTransHandler stage, I have a handler that
reads the post data like so:

my $method = $r->method();
if ($method =~ /post/i) {
    my $content;		  
    if ($content =~ /some_regex/){
        # redirect
    } else {
        # continue with post
        return OK;

I can capture the POST data and redirect the user just
fine. The problem occurs with the submitted forms that
don't match the regex.  If I just return OK, the
browser hangs (because the POST data has been reset?).
 I'll admit I'm a bit confused as to what's actually
going on here (still new to mod_perl).  I read you're
not supposed to parse the form data except at the
ContentHandler step, but since the form is submitting
to a remote host, I can't really do that.

Any ideaas?


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Report problems:
Mail list info:
List etiquette:

View raw message