[whatwg/url] Can a URL have a segmented path with zero segments? (Issue #926)

Scripter17 created an issue (whatwg/url#926)

### What is the issue with the URL Standard?

[The definition for a URL path](https://url.spec.whatwg.org/#url-path) currently says "A URL path is either a URL path segment or a list of zero or more URL path segments.", but it's not clear if it's possible to have a segmented path with zero segments or if this case only occurs when starting to parse the path.

In particular I'm not clear if `non-special://host` has an empty opaque path or an empty segmented path.

I think updating the table just above the URL path definition to include `non-special://host` would be enough, though I think requiring segmented paths to have at least one segment would be good. Just not sure how to rewrite the parser to account for that.

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

Message ID: <whatwg/url/issues/926@github.com>

Received on Saturday, 4 July 2026 05:13:54 UTC