Re: [whatwg/fetch] investigate data: URL quoted parameters (#970)

> > data:application/example;lang=%22foo%22baz%22,body
> 
> would correspond to
> 
> > content-type: application/example;lang="foo"bar"
> 
> since quoted string allows embedded " marks.

The latter is clearly invalid per both [RFC 2045](https://tools.ietf.org/html/rfc2045#section-5.1) and the more recent (and more directly Fetch-relevant) [RFC 7231](https://tools.ietf.org/html/rfc7231#section-3.1.1.1), so does that mean the former is also invalid? And further, does that mean that it would be valid with double encoding as `data:application/example;lang=%22foo%2522baz%22,body` (which has its own undesirable consequences), or is it just impossible to include `"` in a parameter?

It seems like your mental model requires %xx to sometimes be interpreted as a delimiter and other times to be interpreted as content, even when all of the preceding content is identical. Does it also include quoted-pair backslash escapes (and if so, can the backslash itself be encoded as %5C)? Either way, it's bringing in a whole lot of parsing complexity that wouldn't be necessary if the commentary of section 5 about "%xx encoding, which itself is sufficient" were embraced as proposed by https://www.rfc-editor.org/errata/eid5923 .

-- 
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/fetch/issues/970#issuecomment-564182592

Received on Tuesday, 10 December 2019 19:02:29 UTC