On Sat, 29 Apr 2017 07:07:34 +1000, Stuart Douglas <sdouglas@...> said:
[...]
SD> This is wrong. Just because the response itself is US-ASCII the actual
SD> values can be decoded into a different charset, which AFAIK all
SD> servlet containers currently do and users expect to work.
SD> If you want to say anything about it then it should be something like:
SD> In the case of application/x-www-form-urlencoded and multipart
SD> requests accessed through ServletRequest.getParameter and similar
SD> methods then this charset represents the charset that the parameters
SD> will be decoded to, not the actual encoding of the request body (which
SD> is ALWAYS US-ASCII as per RFC).
I'll make one more attempt to resolve Julian Reschke's Public Review
comment.
Here is the original 3.12 text:
8<---------------
Currently, many browsers do not send a char encoding qualifier with the
Content-Type header, leaving open the determination of the character
encoding for reading HTTP requests. The default encoding of a request
the container uses to create the request reader and parse POST data must
be "ISO-8859-1" if none has been specified by the client request, web
application or container vendor specific configuration (for all web
applications in the container). However, in order to indicate to the
developer, in this case, the failure of the client to send a character
encoding, the container returns null from the getCharacterEncoding
method.
8<---------------
Here is my revised proposal, trying to take into account Mark's and
Stuart's comments.
8<---------------
Currently, many browsers do not send a char encoding qualifier with the
Content-Type header, leaving open the determination of the character
encoding for reading HTTP requests. In the absence of a char encoding
qualifier, if the Content-Type is application/x-www-form-urlencoded, the
default encoding the container uses to create the request reader and
parse POST data must be US-ASCII. Any %nn encoded values must be
decoded to ISO-8859-1. For any other Content-Type, if none has been
specified by the client request, web application or container vendor
specific configuration (for all web applications in the container), the
default encoding of a request the container uses to create the request
reader and parse POST data must be ISO-8859-1. However, in order to
indicate to the developer the absence of a char encoding qualifier, the
container must return null from the getCharacterEncoding method."
8<---------------
Please let me know any comments on this, otherwise we'll just go with
this text.
Ed
--
| edward.burns@... | office: +1 407 458 0017