tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 32296] - HTTP Header Content-Type always ISO-8859-1 under debian (browsers no longer detect encoding correctly - worked perfectly under redhat9)
Date Fri, 19 Nov 2004 17:38:40 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32296>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32296





------- Additional Comments From hauser@acm.org  2004-11-19 18:38 -------
now, I got it to work, albeit in an ugly way:
in void org.apache.coyote.http11.Http11Processor.prepareResponse()
instead of
                headers.setValue("Content-Type").setString(contentType);
do 
                if (contentType.startsWith("text/html")) {
                    headers.setValue("Content-Type").setString(
                            "text/html;charset=UTF-8");
                } else {
                    headers.setValue("Content-Type").setString(contentType);
                }

and then replace that class in tomcat-http11.jar and all works fine (obviously
only for a site that serves all html pages in UTF-8).

Conclusion: Either it is a bug, or there must be another option to determine the
charset of the HTTP header that is not really obviously documented.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message