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

Discussion in 'Perl Misc' started by xuqy@jlu.edu.cn, Sep 27, 2005.

  1. Guest

    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?
     
    , Sep 27, 2005
    #1
    1. Advertising

  2. 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..._frm/thread/2371f28a8acd8071/4752d47cb623154a
     
    Brian McCauley, Sep 27, 2005
    #2
    1. Advertising

  3. 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/ ).
     
    Alan J. Flavell, Sep 27, 2005
    #3
  4. 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/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.
     
    Brian McCauley, Sep 28, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Harris
    Replies:
    0
    Views:
    6,413
    Simon Harris
    May 10, 2005
  2. Stanimir Stamenkov
    Replies:
    1
    Views:
    2,494
    Stanimir Stamenkov
    Aug 17, 2005
  3. Pavel
    Replies:
    2
    Views:
    1,678
    Peter Flynn
    Aug 4, 2004
  4. etheriau
    Replies:
    1
    Views:
    678
    Pavel
    Aug 23, 2004
  5. Joe Curry

    Invalid URI: The format of the URI could not be determined.

    Joe Curry, Oct 8, 2003, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    358
    Joe Curry
    Oct 8, 2003
Loading...

Share This Page