This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://url.spec.whatwg.org/#host-parsing [[ If dots seen is 0 or 2, increase piece pointer by one. ]] Shouldn't this be If dots seen is 1 or 3, increase piece pointer by one.
Could you perhaps explain why? This was written a while ago. I'm a bit rusty on the details and it would take me a while to get back into it.
The piece needs to be set based on the first two IPv4 values so the piece pointer must remain the same until after the first two IPv4 values have been extracted and the piece has been set with its final value. This means that the piece pointer should not change until dots seen is 1 (when the first two IPv4 values have been extracted) or 3 (when all 4 IPv4 values have been extracted) otherwise the piece is not calculated correctly (i.e. not calculated on two IPv4 values). I had to make this change in my code for it to work properly. Hope this is clear enough.
And thanks again! https://github.com/whatwg/url/commit/72e58483bf3cfe2c773ba3b87a710ace0e11ff12