tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <>
Subject Re: cvs commit: jakarta-tomcat-connectors/coyote/src/java/org/apache/coyote
Date Wed, 28 Jul 2004 16:58:38 GMT
Jan Luehe wrote:

> Bill,
>> then I'd suggest simply
>> doing:
>>    setCharacterEncoding(getCharacterEncoding());
>> in Response.getWriter (since the spec only requires that we identify the
>> charset when using a Writer, and we don't really know what it is when 
>> using
>> OutputStream).
> The problem with this is that if you call getWriter() (with your 
> proposed fix) followed by getContentType(), the returned content type
> will include a charset, which is against the spec of getContentType():
>   * If no character encoding has been specified, the
>   * charset parameter is omitted.
> This is why we need to append the default charset to the value of the
> Content-Type header, if no char encoding has been specified.

This is not acceptable, and is not an option, so you shouldn't be using 
"we need", because we won't ;)
The right solution is IMO to point out the issues to the specification 


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message