- From: Christer Holmberg <christer.holmberg@ericsson.com>
- Date: Wed, 30 Jun 2021 09:32:38 +0000
- To: Julian Reschke <julian.reschke@gmx.de>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Hi, >>>> Eventhough the generic syntax allows both tokens and quoted-strings >>>> for parameter values, I don't think it means that you by default can >>>> use both for a particular parameter. >>> >>> That is exactly what it means. Either token or quoted-string can be used for any parameter value. Except parameters which are defined as needing a specific form. >> >> Ok, I found the following text in RFC 7231: >> >> "A parameter value that matches the token production can be >> transmitted either as a token or within a quoted-string. The quoted >> and unquoted values are equivalent." > > Yes. > >> In addition, it seems like for HTTP quoted-string values are not case-sensitive, as the following examples are all equivalent: >> >> text/html;charset=utf-8 >> text/html;charset=UTF-8 >> Text/HTML;Charset="utf-8" >> text/html; charset="utf-8" > > That's because it's the charset parameter. Don't generalize from that example. > >> SIP also uses the header fields, and in SIP quoted-strings are by default *case-sensitive*, so e.g., "utf-8" and "UTF-8" would not be equivalent. But, I guess that is for SIP to sort out, if needed. > > It's specific to the definition of the charset parameter in HTTP's Content-Type field. Ok, but how does it work in general, then? For example, assume I have a parameter foo that allows both token and quoted-string parameter values. I then define/register the value "BAR". Does that mean that "BaR", "bar", "Bar" etc are now allowed - unless explicitly indicated, as in the case of charset? Regards, Christer
Received on Wednesday, 30 June 2021 09:32:53 UTC