tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject Re: specifying the content-type
Date Sat, 11 Jun 2011 16:02:08 GMT
On 07.06.2011 21:29, Christopher Schultz wrote:
> Bernd,
> On 6/7/2011 2:23 PM, Lentes, Bernd wrote:
>> Christopher Schultz wrote:
>>> How did you do it? If you use <META HTTP-EQUIV="Content-Type"
>>> CONTENT="text/html" />, it should override any Content-Type
>>> sent in the HTTP response headers
>> Yes, we used this. But
(unfortunally only in german) says
>> "Im Konfliktfall, also wenn der Webserver im HTTP-Header eine hiervon abweichende
Angabe sendet, wird ├╝blicherweise die Angabe des HTTP-Headers verwendet.", which means that,
if you have the META in the HTML-file and also the content-type in the HTTP-Header, mostly
the HTTP-Header "wins".
> You're right. I had it wrong: the HTTP header overrides the content of
> the document.

With respect to text/plain sent by Apache: This is due to:

So setting

DefaultType none

in Apache should put you into the same browser auto-detect situation
than when talking to Tomcat directly (assuming minimal version Apache
2.2.7). In fact for the forthcoming Apache 2.4 the default has been
switched to none :)



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

View raw message