webspecs / url

The URL specification
https://specs.webplatform.org/url/webspecs/develop/
Other
21 stars 9 forks source link

Writing IPv4 addresses #12

Open annevk opened 9 years ago

annevk commented 9 years ago

We should just require the syntax from RFC 3986, but instead of ABNF use prose to remain consistent. (Although I really would have expected us to use syntax diagrams here, as this section is aimed at web developers and not parser implementers.)

rubys commented 9 years ago

Is this missing a word? I'm either having difficultly parsing the part before the first comma or I'm having difficultly reconciling it with the remainder of the first sentence.

I'm presuming that this is concerning the <p class=XXX> concerning IPv4 addresses in what is currently called "Authoring Requirements", but likely will be renamed to something related to URL string conformance requirements.

annevk commented 9 years ago

It's not missing a word. I'm just saying that a valid IPv4 address should be one that is valid per RFC 3986, but we should define that in a way that is consistent with how we define the syntax of other parts of the URL.

rubys commented 9 years ago

Thanks for the clarification. Got it. Here's the ABNF:

     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

So exactly four numbers, all numbers are decimal, no leading zeros, all values between 0 and 255, ... things like that. Make sense to me.

annevk commented 9 years ago

Yup, that.