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)


There is no such header as accept-content-type, it is simple "Accept"
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.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to