On 25/10/17 10:23, Mark Thomas wrote:
> On 24/10/17 07:36, Lazar Kirchev wrote:
>> Hello,
>>
>> Change http://svn.apache.org/viewvc?view=revision&revision=1801052 tries,
>> in case no charset is specified for the response, to determine a default
>> one based on the content language if such is present. For en and fr
>> languages the ISO-8859-1 charset is used as default.
> 
> There is slightly more to it than that.
> 
> If the application sets the "Content-Language" header then Tomcat
> extracts the Locale from that header and calls setLocale().
> 
> This behaviour is not required by the specification but is one of a
> number of cases where Tomcat tries to map the explicit setting of HTTP
> headers to Servlet API calls. "Content-Type" and "Content-Length" are
> the others.

Hmm. Looking at Tomcat 9 that code is no longer there. It isn't there in
8.0.x either. Digging in the svn history the "Content-Language" handling
was removed (r1374824) shortly after it was added (r1374073). The commit
message doesn't explain why.

Time to check the mail archives...

... and here is the thread:
http://tomcat.markmail.org/thread/qhnzq7v3dopgi7uz

Having reviewed that thread, I don't see anything that has really
changed since 2012. On that basis I'll remove "Content-Language"
handling from 7.0.x to align it with the other versions.

Mark

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

Reply via email to