perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Foertsch <torsten.foert...@gmx.net>
Subject Re: Obtaining URI supplied by the client from a subrequest
Date Fri, 24 Nov 2006 11:41:52 GMT
On Friday 24 November 2006 12:09, Radoslaw Zielinski wrote:
> I'm redirecting to a mod_perl handler with ErrorDocument:
>
>   Order allow,deny
>   ErrorDocument 403 /login
>   <Location "/login">
>     Order deny,allow
>     SetHandler modperl
>     PerlResponseHandler My::Handler
>   </Location>
>
> On an unauthorized request, Apache makes a subrequest served by
> My::Handler::handler().  So far, so good.
>
> I need the original URI in the handler.  $r->uri contains "/login",
> so does $r->unparsed_uri -- useless.  
>
> Is there any smarter way than this hack?
>
>   my $request_uri = (split /\s/, $r->the_request)[1];

ErrorDocuments are served by internal redirects. So $r->prev->uri should do.

Torsten

Mime
View raw message