You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Denis Haskin <De...@HaskinFerguson.net> on 2001/12/04 18:36:34 UTC

Setting Content-type in TC 3.2.2?

[Apologies if this is a FAQ or known bug; couldn't find anything
relevant in bug db or list archives.]

I'm getting weird behavior setting the content type in responses for
Tomcat 3.2.2.  I will try Tomcat 3.3 when I get a chance, but right now
I don't have the time to make the changes to the configuration files
(there appear to be a few).

What's happening is that it seems like if I set a Content-type: header
containing the value "text/html", Tomcat insists on adding another
Content-Type: header with the value "text/html; charset=UTF-8".  This
happens even if I set the content-type header to be *exactly* the same
string that Tomcat sets (e.g. with the encoding).

This seems to happen whether I set this header using setHeader or
setContentType.

If I set the content-type to "text/plain" this doesn't happen.

If I don't set the content-type at all, no Content-Type: header is sent.

Do I need to be mucking with setLocale?  Is this a bug?

Thanks,

dwh


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>