-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Mark,
On 4/29/16 3:15 PM, Mark Thomas wrote: > On 29/04/2016 19:44, Christopher Schultz wrote: >> All, >> >> I've been doing a bit of searching and I just think I haven't >> found the right path at this point. There are only about 4000 >> specifications that all overlap and refer to each other, here. >> >> I'm looking for a reference that proves my expectation that the >> values of the "accept-charset" and "accept-content-type" HTTP >> headers are always restricted to the US-ASCII character set. >> Basically, I have a method that checks to see that the client >> supports certain things, and I need to "lower-case" the values to >> check them appropriately. I'd like to use US-ASCII as the >> "lower-casing" rules, but I want to be sure there's no weird >> corner case where US-ASCII lower-case semantics are going to bite >> me in the behind. >> >> Does anyone know where the charset used for those values is >> specified? > > RFC 7231, 5.3.3 Accept-Charset = 1#( ( charset / "*" ) [ weight ] > ) > > RFC 7231, 3.1.1.2. charset = token > > RFC 7230, 3.2.6 token = 1*tchar tchar = "!" / "#" > / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." / "^" / "_" / "`" / > "|" / "~" / DIGIT / ALPHA ; any VCHAR, except delimiters > > > RFC 7230, 1.2 VCHAR (any visible [USASCII] character) Yeah, I just hadn't quite made it down to that level. Thanks. > There is no such header as accept-content-type, it is simple > "Accept" Right. I added the (fictional) "-content-type" suffix to the header name to make it clear which one I was talking about. > RFC 7231, 5.3.3 Accept = #( media-range [ accept-params ] ) > media-range = ( "*/*" / ( type "/" "*" ) / ( type "/" subtype ) > ) *( OWS ";" OWS parameter ) accept-params = weight *( accept-ext > ) accept-ext = OWS ";" OWS token [ "=" ( token / quoted-string ) ] > > RFC 7231, 3.1.1.1 media-type = type "/" subtype *( OWS ";" OWS > parameter ) type = token subtype = token > > > Which by my reckoning means US ASCII for lower casing is fine. Perfect, thanks. - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlcjt5cACgkQ9CaO5/Lv0PCkuACeLxGNr7vWszYuVMLcdkRLaV9Z VBwAnRIUDFOCN0QCvW+RLHEVLMki7+n7 =nI+C -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org