Re: Apache2::URI::unescape_url bug?

Vincent Veyron <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Fri, 27 Jun 2014 17:12:35 +0000
Mark Hedges <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.