perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Veyron <vv.li...@wanadoo.fr>
Subject Re: Apache2::URI::unescape_url bug?
Date Sat, 28 Jun 2014 14:02:18 GMT
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