Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

mod_perl 2.0.4: $r->uri

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


J.Gao at isu

Jun 5, 2011, 11:19 PM

Post #1 of 4 (1132 views)
Permalink
mod_perl 2.0.4: $r->uri

Hi All

It seems that $r->uri returns the URI string with %20 decoded to white space, but leaves "+" unchanged.
Is this the right behaviour?


Jie

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


torsten.foertsch at gmx

Jun 6, 2011, 1:13 AM

Post #2 of 4 (1062 views)
Permalink
Re: mod_perl 2.0.4: $r->uri [In reply to]

On Monday, June 06, 2011 08:19:00 Jie Gao wrote:
> It seems that $r->uri returns the URI string with %20 decoded to white
> space, but leaves "+" unchanged. Is this the right behaviour?

RFC2396 defines escaped encoding as "%" hex hex only, see chapter 2.4.1.
In this sense I think the answer is yes.

Anyway, this is rather a httpd API than a modperl question. Modperl only
provides access to the "uri" field of the "struct request_rec" here. So,
for more information ask here:

dev [at] httpd
users [at] httpd

Torsten Förtsch

--
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


J.Gao at isu

Jun 6, 2011, 1:25 AM

Post #3 of 4 (1065 views)
Permalink
Re: mod_perl 2.0.4: $r->uri [In reply to]

Thanks for your reply.

Now if I want to get a work-around within mod_perl, what would you do?


Jie Gao | Systems Administrator
Information and Communications Technology

THE UNIVERSITY OF SYDNEY
316 Abercrombie Street Building G17 | The University of Sydney | NSW | 2006

T +61 2 8627 7824 | E j.gao [at] sydney | W http://sydney.edu.au/ict/

CRICOS 00026A
This email plus any attachments to it are confidential. Any unauthorised
use is strictly prohibited. If you receive this email in error, please
delete it and any attachments.

Please think of our environment and only print this e-mail if necessary.

* Torsten F?rtsch <torsten.foertsch [at] gmx> wrote:

> Date: Mon, 6 Jun 2011 10:13:42 +0200
> From: Torsten F?rtsch <torsten.foertsch [at] gmx>
> To: dev [at] perl
> CC: Jie Gao <J.Gao [at] isu>
> Subject: Re: mod_perl 2.0.4: $r->uri
> User-Agent: KMail/1.13.5 (Linux/2.6.34.8-0.2-desktop; KDE/4.4.4; x86_64;
> ; )
>
> On Monday, June 06, 2011 08:19:00 Jie Gao wrote:
> > It seems that $r->uri returns the URI string with %20 decoded to white
> > space, but leaves "+" unchanged. Is this the right behaviour?
>
> RFC2396 defines escaped encoding as "%" hex hex only, see chapter 2.4.1.
> In this sense I think the answer is yes.
>
> Anyway, this is rather a httpd API than a modperl question. Modperl only
> provides access to the "uri" field of the "struct request_rec" here. So,
> for more information ask here:
>
> dev [at] httpd
> users [at] httpd
>
> Torsten Förtsch
>
> --
> Need professional modperl support? Hire me! (http://foertsch.name)
>
> Like fantasy? http://kabatinte.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


torsten.foertsch at gmx

Jun 6, 2011, 3:49 AM

Post #4 of 4 (1074 views)
Permalink
Re: mod_perl 2.0.4: $r->uri [In reply to]

On Monday, June 06, 2011 10:25:14 Jie Gao wrote:
> Now if I want to get a work-around within mod_perl, what would you do?

First, you have to define what you think is the "right" behavior. Then
you can for instance use a PerlTransHandler to patch the uri field as
required.

PerlTransHandler "sub { \
my ($r)=@_; \
$r->uri(parse_uri $r->unparsed_uri); \
-1; \
}"

parse_uri() is to be defined by you.

Torsten Förtsch

--
Need professional modperl support? Hire me! (http://foertsch.name)

Like fantasy? http://kabatinte.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.