tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Addison <marvin.addi...@gmail.com>
Subject Re: html meta http-equiv content-type not work ?
Date Mon, 01 Aug 2011 15:18:40 GMT
> I think you mean "any attempt to WRITE The RESPONSE".

I took some time to verify the effect I described,
https://github.com/serac/charset-test.  Reading data from the request
body coerces the encoding as I claimed.  Simply swap the order of the
filter-mappings in web.xml and post some unicode data to see for
yourself.  If ConsumeRequestFilter appears before
CharacterEncodingFilter, the posted data will not be treated as UTF-8.

> Spring's filter only sets the /request/ encoding, not the response.

Looks like it sets response encoding when forceEncoding == true:

		if (this.encoding != null && (this.forceEncoding ||
request.getCharacterEncoding() == null)) {
			request.setCharacterEncoding(this.encoding);
			if (this.forceEncoding) {
				response.setCharacterEncoding(this.encoding);
			}
		}

(3.0.5 source)

M

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


Mime
View raw message