You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Eric Jain <ja...@gmx.net> on 2000/06/08 07:41:53 UTC
PerlTransHandler and CGI.pm
When processing the url
http://biodoc.ch/de/search?query=%2Btest+%2Bdna+-xyz ,
$cgi->param('query') correctly returns '+test +dna -xyz'.
But if I use http://biodoc.ch/de/search;query=%2Btest+%2Bdna+-xyz
instead, I get ' test dna -xyz'. If I include a %3F (=?) in the url,
I even get a 404 error. Slashes too only work if they are not encoded.
There must be something wrong in my PerlTransHandler, approximatly
here:
my $uri = $r->uri();
if ( my($u1,$u2) = $uri =~ / ^ ([^?]+?) ; ([^?]*) $ /x )
{
$r->uri($u1);
$r->args($u2);
}
But what?
--
Eric Jain
RE: PerlTransHandler and CGI.pm
Posted by Eric Jain <ja...@gmx.net>.
Got it... Seems like the query string is decoded twice: Therefore
http://biodoc.ch/de/search;query=%252Btest+%252Bdna+-xyz
works perfectly, since all the '%' are encoded. Then it even works
with slashes :-)
--
Eric Jain
> When processing the url
> http://biodoc.ch/de/search?query=%2Btest+%2Bdna+-xyz ,
> $cgi->param('query') correctly returns '+test +dna -xyz'.
>
> But if I use http://biodoc.ch/de/search;query=%2Btest+%2Bdna+-xyz
> instead, I get ' test dna -xyz'. If I include a %3F (=?)
> in the url,
> I even get a 404 error. Slashes too only work if they are
> not encoded.
>
> There must be something wrong in my PerlTransHandler, approximatly
> here:
>
> my $uri = $r->uri();
>
> if ( my($u1,$u2) = $uri =~ / ^ ([^?]+?) ; ([^?]*) $ /x )
> {
> $r->uri($u1);
> $r->args($u2);
> }
>
> But what?
>
> --
> Eric Jain
>