whatwg / url

URL Standard
https://url.spec.whatwg.org/
Other
527 stars 137 forks source link

Fix validation error when a URL has credentials but no host #793

Closed karwa closed 11 months ago

karwa commented 11 months ago

Since this branch requires that atSignSeen is true, we must have already emitted an invalid-credentials validation error and this emission must be a duplicate.

What this check is actually doing is confirming that the host is not empty before it begins parsing it, so host-missing is a more appropriate error to emit.

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

karwa commented 11 months ago

Sorry just wanted to verify it once again. I think this is correct.

karwa commented 11 months ago

@annevk Ah yes, okay - updated. I moved the example and replaced it with one that demonstrates credentials in a non-special scheme.