URI::canonical method fails to canonicalize "http:://hamlug.org/../../../../"

X

xuqy

I found a strange URI when I examined the crawling log of a web crawler
I recently wrote in Perl: "http://hamlug.org/../../../../". When I
paste it into web browser's address column, it was transformed to
"http://hamlug.org/", which is obviously correct. However, when I wrote
a simple test script as follows:

#!/usr/bin/perl -w
use strict;

my $rawURL = "http://hamlug.org/../../../../";
my $url = URI->new($rawURL)->canonical->as_string;
print $url, "\n";


To my great astonishment, URI::canonical method does nothing to my
$rawURL.
What is the reason?
Does there exist some module to tackle this?
 
B

Brian McCauley

B

Brian McCauley

Alan said:
Yes, but where -is- this mooted draft?

The links to it in the previous thread are still valid.

http://www.gbiv.com/protocols/uri/rev-2002/draft-fielding-uri-rfc2396bis-07.html#path
http://www.gbiv.com/protocols/uri/r...-uri-rfc2396bis-07.html#relative-dot-segments
I don't find anything
which would match it in the place where internet drafts seem to
be stashed these days ( http://www.ietf.org/internet-drafts/ ).

Well its expiry was March 2005, maybe they don't keep expired ones.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top