Problem with PerlTransHandler
am 05.01.2011 01:09:22 von CrAsH-DMX--0016361e7f1c7dab5104990e32dd
Content-Type: text/plain; charset=ISO-8859-1
Hi all
First of all, I want to clarify that I am pretty newie in mod_perl and I'm
using mod_perl 1.
I need to write a module that allows me to capture all the requests that are
made to my server,
get a string with all the parameters stored in $r->content or $ r-> args for
each request, apply
some process and store again in $r->content or $ r->args to follow their
way.
To achieve this, I'm trying to write a PerlTransHandler:
package Test::test_filter;
use strict;
use Apache::Constants qw(:common);
sub handler {
my $r = shift;
my $params = $r->method eq "POST" ? $r->content:$r->args;
print STDERR "PARAMS:$params\n";
#DO SOMETHING WITH $params
#$r->content($params);
return DECLINED;
}
1;
The problem is, after showing the message with the parameters in the log
file the page with the POST form
does not change; this mean, don't show me the next page where i should see
the values of the modified parameters.
If comment my $params = $r->method eq "POST" ? $r->content:$r->args; all
works fine.
I need to do something else?, I'm using the right type of handler?
In advance thank you very much for your answers.
--0016361e7f1c7dab5104990e32dd
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Hi all
First of all, I want to clarify that I am pretty newie in mod=
_perl and I'm using mod_perl 1.
I need to write a module that al=
lows me to capture all the requests that are made to my server,
get a s=
tring with all the parameters stored in $r->content or $ r-> args for=
each request, apply
some process and store again in $r->content or $ r->args to follow th=
eir way.
To achieve this, I'm trying to write a PerlTransHandler=
:
package Test::test_filter;
use strict;
use Apache::Constants qw(:common);
sub handler {
=A0 my $r =3D shift;
=A0 my $params =3D $r->method eq "POST" ? $r->con=
tent:$r->args;
=A0 print STDERR "PARAMS:$params\n";
=A0 #DO S=
OMETHING WITH $params
=A0 #$r->content($params);
=A0 return DECLINED;
}
1;
The problem is, after showing the message with the parameters=
in the log file the page with the POST form
does not change; this mean=
, don't show me the next page where i should see the values of the modi=
fied parameters.
If comment my $params =3D $r->method eq "POST" ? $r->co=
ntent:$r->args; all works fine.
I need to do something else?, I=
39;m using the right type of handler?
In advance thank you very much=
for your answers.
--0016361e7f1c7dab5104990e32dd--