perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hedges <Mark.Hed...@Ticketmaster.com>
Subject RE: Apache2::URI::unescape_url bug?
Date Sun, 29 Jun 2014 17:36:43 GMT
Another library providing the same function in working order is not a reason to not fix the
function in Apache2::URI.

s/b Apache2::URI::unescape_url()... [...]

Mark


-----Original Message-----
From: Vincent Veyron [mailto:vv.lists@wanadoo.fr] 
Sent: Saturday, June 28, 2014 7:02 AM
To: Mark Hedges
Cc: modperl@perl.apache.org
Subject: Re: Apache2::URI::unescape_url bug?

On Fri, 27 Jun 2014 17:12:35 +0000
Mark Hedges <Mark.Hedges@Ticketmaster.com> wrote:

> The intent was to report that Apache2::URI::unescape does not seem to work correctly.
> 

This is what I get when I try your code :

Undefined subroutine &Apache2::URI::unescape called at /home/lib/Carnet/bla.pm line 35.\n

I don't see unescape in the list of functions in the doc :

http://perl.apache.org/docs/2.0/api/Apache2/URI.html

Is there a particular reason to use Apache2::URI in mod_perl?

use URI::Escape();

sub handler {
    my ($r) = @_;
    my $string = "6%2D41913%2FUK1";
    my $test = URI::Escape::uri_unescape($string);
    $r->log_error($test);
}

Result:

[Sat Jun 28 15:50:06 2014] [error] 6-41913/UK1

Note the $test variable I added; your code with URI::Escape :

sub handler {
    my ($r) = @_;
    my $string = "6%2D41913%2FUK1";
    URI::Escape::uri_unescape($string);
    $r->log_error($string);
}

Result:

[Sat Jun 28 15:54:44 2014] [error] 6%2D41913%2FUK1

-- 
					Salutations, Vincent Veyron

http://vincentveyron.com

Mime
View raw message