tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael-O <1983-01...@gmx.net>
Subject Re: ErrorReportValve's char encoding ignored
Date Fri, 17 May 2013 20:22:59 GMT
Am 2013-05-15 16:35, schrieb Christopher Schultz:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Micheal,
>
> On 5/15/13 3:46 AM, Michael-O wrote:
>> I have modified the ErrorReportValve's messages outside of the
>> one-byte range and the output got mangled. The response does not
>> contain a char encoding anymore.
>
> Can you be more specific? What exactly did you modify, and how did you
> modify it? What are the exact HTTP response headers that you get?
>
>> I know that the error valve does this:
>>
>> response.setContentType("text/html");
>> response.setCharacterEncoding("utf-8");
>>
>> but the setCharEnc method is completely ignored. Because the var
>> usingWriter is already set to true. This happens in the
>> ApplicationDispatcher#doForward line 393/394 when a servlet
>> performs a forward.
>
> Looking at Tomcat 6.0.x/trunk line 393 is part of the cleanup code,
> and the response PrintWriter is immediately closed. That does not
> appear to have changed since 6.0.35. At this point, the request should
> be /over/.
>
> What else is going on? Is any content being generated before the
> ErrorReportValve gets invoked? If the response has already been
> committed, then Tomcat can't re-write the response headers.
>
>> Though a response.getReporter() is used but this one is completely
>> unaware of the char encoding.
>>
>> I am on Tomcat 6.0.35.
>
> Where is response.getReporter being called?
>
>> I presume this to be a bug. Should I file a BZ issue?

Hi Christopher,

did you get any chance to check my reply from 2013-05-15 17:13+02:00?
Hopefully, that mail made the issue clearer.

Thanks,

Michael


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


Mime
View raw message