Re: [whatwg/url] Allow queries in relative references when the baseURL has an opaque path (Issue #668)

> The path and query together determine what you get back from the server. It's only the fragment that's special and does something locally.

Is that really something we can determine about all URLs with opaque paths? Enough to ban this operation? I mean, all of their components are opaque and have application-defined meaning - and we can't say which of their components have meaning to whom (if they even speak to a server) or for what purpose.

And even if we can determine that, I actually think it would be an argument in favour of supporting this - imagine I have a URL schema for books, `isbn:12345`. Why should I be prohibited from building a table of contents which uses relative URL strings to refer to specific pages? e.g. `?page=24`. I think that should be supported, the same way it works with non-opaque paths.

As for the path, I think our restrictions on modifying opaque paths are also questionable. The only reasons I can think of is that the same input would behave _very_ differently between URLs with opaque and non-opaque paths (replace vs append, respectively).

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

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

Received on Tuesday, 7 March 2023 08:17:31 UTC