W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2013

Re: [whatwg] URL standard: Query string parsing; host parsing

From: Julian Reschke <julian.reschke@gmx.de>
Date: Wed, 13 Mar 2013 21:02:54 +0100
Message-ID: <5140DB6E.5050606@gmx.de>
To: poccil14@gmail.com
Cc: whatwg@whatwg.org
On 2013-03-13 18:38, poccil14@gmail.com wrote:
> (This was originally a bug report, but I was told to e-mail instead.  Another
> issue is also added.)
>
> -- Non-relative URLs in the query string --
>
> Earlier I posted an issue with serializing the query in non-relative URLs. But after
> I read more about URIs, I am not sure whether the scheme data and query string
> should be kept separate.  There is a distinction between how the URL specification
> categorizes URLs and how the URI standards (RFC3986 and RFC3987) classify URIs.
>
> Both standards allow fragments to appear in all URLs/URIs, but they differ on whether
> a query string is parsed.  In the URL standard, query strings can occur in all URLs, but
> in the URI standards, a query string is not parsed if the URI contains a scheme but
> the scheme data doesn't begin with a slash (that is, if the URI is an "opaque" URI).
>
> Take the following as an example:
>
> mailto:me@example.com?subject=Hi
>
> In the URL standard, the URL is parsed as:
>
> scheme - mailto
> scheme data - me@example.com
> query - subject=Hi
>
> but in the URI standards, the URI is parsed as:
>
> scheme - mailto
> scheme-specific part - me@example.com?subject=Hi
>
> Here, in the mailto scheme, separating the scheme data and the query may be a useful distinction.
>
> As another example, the string
>
> jar:http://example.com/jar?x=1!/com/example/Foo.class
>
> is parsed in the URI standards as:
>
> scheme - jar
> scheme-specific part - http://example.com/jar?x=1!/com/example/Foo.class

I have no idea what you're talking about, see 
<http://greenbytes.de/tech/webdav/rfc3986.html#rfc.section.3>.

This will parse into:

scheme: jar
hier-part: http://example.com/jar
query: x=1!/com/example/Foo.class

> but in the URL standard as:
>
> scheme - jar
> scheme data - http://example.com/jar
> query - x=1!/com/example/Foo.class
> ...

Best regards, Julian
Received on Wednesday, 13 March 2013 20:03:55 GMT

This archive was generated by hypermail 2.3.1 : Wednesday, 13 March 2013 20:03:55 GMT