#3 UriUriA::absolutePath wrong

Git HEAD
closed
Parsing (9)
5
2008-07-29
2008-07-10
No

The given URIs

file:///c:/folder/name.ext
file://devserver/folder/name.ext

contain absolute paths after the authority component. The uriparser does not recognize that the path is absolute. UriUriA::absolutePath = 0

Suns implementation java.net.URI returns as path the following strings for the above mentioned URIs:

/c:/folder/name.ext
/folder/name.ext

According to RFC3986 Section 3 the slash after the authority component belongs to the path. So every path after an authority is an absolute path.

Discussion

  • Sebastian Pipping

    • assigned_to: nobody --> hartwork
    • summary: UriUriA::absoulutePath wrong --> UriUriA::absolutePath wrong
    • status: open --> pending
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed
     
  • Matthew Woehlke

    Matthew Woehlke - 2012-12-20

    I'm hitting the same problem; both above examples should be absolute paths, but 'file:///...' is being flagged as relative.

    I was able to work around this by using this test for absoluteness:
    uri.absolutePath || ((uri.hostText.first != nullptr) && (uri.pathHead != nullptr))

    So... I'm going to argue that the test matrix is wrong, and should be:

    Rule | Example | hostSet | absPath | emptySeg
    ------------------------------------|---------|---------|---------|---------
    1) URI = scheme ":" hier-part ... | | | |
    1) "//" authority path-abempty | "s://" | true | false | false
    | "s:///" | true | true | true
    2) path-absolute | "s:/" | false | true | false
    3) path-rootless | "s:a" | false | false | false
    | "s:a/" | false | false | true
    4) path-empty | "s:" | false | false | false
    ------------------------------------|---------|---------|---------|---------
    2) relative-ref = relative-part ... | | | |
    1) "//" authority path-abempty | "//" | true | false | false
    | "///" | true | true | true
    2) path-absolute | "/" | false | true | false
    3) path-noscheme | "a" | false | false | false
    | "a/" | false | false | true
    4) path-empty | "" | false | false | false
    ============================================================================

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks