I would like to use gzip compression for serving content but exclude all versions of IE6 and below. I tried setting user agents in noCompressionUserAgents but so far without success.
The documentation suggests the setting is a regular expression however a quick review of tomcat's source code shows its using an exact string matcher. Please help if you can point me towards an answer or provide a simple example. Perhaps I'm missing the obvious solution, so I apologize in advance. Thanks gc <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" compression="on" compressionMinSize="20" noCompressionUserAgents="gozilla,traviata" compressableMimeType="text/html,text/xml,text/css,text/javascript, image/jpg" // Check for incompatible Browser if (noCompressionUserAgents != null) { MessageBytes userAgentValueMB = request.getMimeHeaders().getValue("user-agent"); if(userAgentValueMB != null) { String userAgentValue = userAgentValueMB.toString(); // If one Regexp rule match, disable compression for (int i = 0; i < noCompressionUserAgents.length; i++) if (noCompressionUserAgents[i].matcher(userAgentValue).matches()) return false; -- View this message in context: http://www.nabble.com/Prevent-Tomcat-from-using-compression-for-IE6-tp25744755p25744755.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org