RE: Apache2::URI::unescape_url bug?

Mark Hedges <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <55EEF0B3C5BF2744B2248754D717EE4C4CCC41@USASHEXMB02.LYV.LiveNation.com>
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:[email protected]] 
Sent: Saturday, June 28, 2014 7:02 AM
To: Mark Hedges
Cc: [email protected]
Subject: Re: Apache2::URI::unescape_url bug?

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.