Re: [url] Requests for Feedback (was Feedback from TPAC)

* Sam Ruby wrote:
>I base my assertion that this is not a valid URI based on the following 
>quote from RFC 3986:
>
>       IPv4address = dec-octet "." dec-octet "." dec-octet "." dec-octet
>
>       dec-octet   = DIGIT                 ; 0-9
>                   / %x31-39 DIGIT         ; 10-99
>                   / "1" 2DIGIT            ; 100-199
>                   / "2" %x30-34 DIGIT     ; 200-249
>                   / "25" %x30-35          ; 250-255
>
>Do you come to a different conclusion?

The relevant part of the specification is

      host        = IP-literal / IPv4address / reg-name

   The syntax rule for host is ambiguous because it does not completely
   distinguish between an IPv4address and a reg-name.  In order to
   disambiguate the syntax, we apply the "first-match-wins" algorithm:
   If host matches the rule for IPv4address, then it should be
   considered an IPv4 address literal and not a reg-name.

`192.168.0.257` does not match IPv4address but does match `reg-name`.
Similarily, `http://127.0.%30.1/` also matches through `reg-name`.

  ["URI", [
    ["scheme", [
      ["ALPHA", [], 0, 1],
      ["ALPHA", [], 1, 2],
      ["ALPHA", [], 2, 3],
      ["ALPHA", [], 3, 4]], 0, 4],
    ["hier-part", [
      ["authority", [
        ["host", [
          ["reg-name", [
            ["unreserved", [
              ["DIGIT", [], 7, 8]], 7, 8],
            ["unreserved", [
              ["DIGIT", [], 8, 9]], 8, 9],
            ["unreserved", [
              ["DIGIT", [], 9, 10]], 9, 10],
            ["unreserved", [], 10, 11],
            ["unreserved", [
              ["DIGIT", [], 11, 12]], 11, 12],
            ["unreserved", [], 12, 13],
            ["pct-encoded", [
              ["HEXDIG", [
                ["DIGIT", [], 14, 15]], 14, 15],
              ["HEXDIG", [
                ["DIGIT", [], 15, 16]], 15, 16]], 13, 16],
            ["unreserved", [], 16, 17],
            ["unreserved", [
              ["DIGIT", [], 17, 18]], 17, 18]], 7, 18]], 7, 18]], 7, 
                18],
      ["path-abempty", [
        ["segment", [], 19, 19]], 18, 19]], 5, 19]], 0, 19]
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
D-10243 Berlin · PGP Pub. KeyID: 0xA4357E78 · http://www.bjoernsworld.de
 Available for hire in Berlin (early 2015)  · http://www.websitedev.de/ 

Received on Monday, 22 December 2014 15:40:17 UTC