Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > URI::canonical method fails to canonicalize "http:://hamlug.org/../../../../"

Reply
Thread Tools

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

 
 
xuqy@jlu.edu.cn
Guest
Posts: n/a
 
      09-27-2005
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?

 
Reply With Quote
 
 
 
 
Brian McCauley
Guest
Posts: n/a
 
      09-27-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) 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....52d47cb623154a

 
Reply With Quote
 
 
 
 
Alan J. Flavell
Guest
Posts: n/a
 
      09-27-2005
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/ ).

 
Reply With Quote
 
Brian McCauley
Guest
Posts: n/a
 
      09-28-2005
Alan J. Flavell wrote:

> Yes, but where -is- this mooted draft?


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

http://www.gbiv.com/protocols/uri/re...s-07.html#path
http://www.gbiv.com/protocols/uri/re...e-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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
method def in method vs method def in block Kyung won Cheon Ruby 0 11-21-2008 08:48 AM
Constant.t fails 240 of 272 tests and recurs.t fails 1 of 25 tests on HPUX using perl 5.8.7 dayo Perl Misc 11 12-16-2005 09:09 PM
slideshow fails, Firefox debugger also fails lkrubner@geocities.com Javascript 2 12-23-2004 06:22 PM
Re: Http Post to the URL fails with Method not supported error bruce barker ASP .Net 0 08-02-2004 04:22 PM
Forms Authentication Fails Between ASP.NET 1.0 and 1.1 Applications (Cookie Decryption Fails) John Saunders ASP .Net 1 11-18-2003 03:25 PM



Advertisments