Home > Archive > PERL Miscellaneous > September 2005 > URI::canonical method fails to canonicalize "http:://hamlug.org/../../../../&quo
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
URI::canonical method fails to canonicalize "http:://hamlug.org/../../../../&quo
|
|
| xuqy@jlu.edu.cn 2005-09-27, 7:56 am |
| 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?
| |
| Brian McCauley 2005-09-27, 7:56 am |
| xuqy@jlu.edu.cn wrote:
> 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.
Ah, it may be _obvious_ but is is _actually_ correct?
In other words has RFC2396 actually been superceded?
See previous discussion...
http://groups.google.com/group/comp...752d47cb623154a
| |
| Alan J. Flavell 2005-09-27, 6:59 pm |
| On Tue, 27 Sep 2005, Brian McCauley wrote:
> In other words has RFC2396 actually been superceded?
STD1 does not show it as having been superseded!
> See previous discussion...
Yes, but where -is- this mooted draft? 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/ ).
| |
|
|
|
|
|