Re: [whatwg/url] Is URL parser supposed to handle `https://blah.com`? (#261)

You increment after the EOF check, not before. You're correct that you
continue looping to the overall step 11, so /blah.com is:

```
pointer = /
/ is EOF? No. pointer++
c = *pointer // "b"
Authority parsing
  buffer += c // "b"
pointer = b  // This is the start of the next step 11
b is EOF? No. Pointer++
c = *pointer
Authority parsing
  buffer += c  // "bl"
...  // Keep repeating step 11
pointer = m
m is EOF? No. pointer++
c = *pointer  // EOF
Authority parsing
  c is EOF, @ is not set, so:
    pointer -= len(buffer)
    buffer = ""
    c = *pointer  // "b"
    Goto host state
Host parsing
   ...
pointer = l  // This is the start of the next step 11
```

That's what I meant by 2.2 of authority parsing; the EOF check happens
before the increment check, so the EOF should be parsed by the authority
parsing state

-- 
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/261#issuecomment-283585968

Received on Thursday, 2 March 2017 08:16:26 UTC