You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2003/09/26 03:47:32 UTC
DO NOT REPLY [Bug 23429] New: -
isCompressable always "false" when charset is specified in Content-Type
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23429>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23429
isCompressable always "false" when charset is specified in Content-Type
Summary: isCompressable always "false" when charset is specified
in Content-Type
Product: Tomcat 5
Version: 5.0.12
Platform: All
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Connector:Coyote
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: ryan@dewell.org
\org\apache\coyote\http11\Http11Processor.java
return (inStringArray(compressableMimeTypes, response.getContentType()));
-----
Problem: compression setting is ignored (isCompressable() == false) when a
charset is specified in the Content-Type header.
The check above for compressable mime types is an "equals" check. When the
Content-Type contains a characterset, for example, by setting:
response.setCharacterEncoding("UTF-8");
The Content-Type header will *never* equal any of the given mime types because
the Content-Type header will contain a charset field as well.
Suggested remedy: Use "startsWith" instead of "equals".