Re: [whatwg] IPv4 parsing

On 24 Jun 2015 at 20:15, Peter Kasting <pkasting@google.com> wrote: 

> How Chrome's omnibox handles this (which I think is compliant with most
> other places):
>
> If there are no dots in the middle of the expression, the number is
> converted to powers-of-256 format and leading 0s are prepended to reach
> four octets:
>
> 66 = 0.0.0.66
> 256 = 0.0.1.0
>
> If there are dots in the middle, the number after the last dot is treated
> as above, while the numbers before the dots must satisfy 0 <= n <= 255 and
> are placed into the highest octets in order:
>
> 1.66 = 1.0.0.66
> 1.256 = 1.0.1.0
> 1.2.66 = 1.2.0.66
> 1.256.66 = invalid

This makes no sense at all.

--
Cheers  --  Tim

Received on Wednesday, 24 June 2015 20:50:42 UTC