[whatwg/url] IPv4 number parser: "If input is the empty string, then return 0. " (#561)

https://url.spec.whatwg.org/commit-snapshots/2ce49383db3506a3c1a527a775693af1100198ef/#host-parsing

> 5. If _input_ is the empty string, then return 0. 

**IPv4 parser** calls **IPv4 number parser** in Step 6.2:

> 2. Let result be the result of parsing _part_. &nbsp; &nbsp; &nbsp;   <-- call to IPv4 number parser
> 3. If _result_ is failure, then return _input_.
> 4. If _result_[1] is true, then set _validationError_ to true.
> 5. Append _result_[0] to _numbers_. 

Now, if the number parser happens to `return 0`, the `result` is neither failure, nor is the meaning/value of `result[0]` or `result[1]` obvious(?)...


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/561

Received on Thursday, 3 December 2020 05:44:05 UTC