When compression is enabled like so: <Connector port="8130" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" debug="0" connectionTimeout="20000" disableUploadTimeout="true" compression="on" compressionMinSize="2048" noCompressionUserAgents="gozilla, traviata" compressableMimeType="text/html,text/xml" /> and a request with no User-Agent is sent, Tomcat dies with a java.lang.NullPointerException at org.apache.coyote.http11.Http11Processor.isCompressable(Http11Processor.java:1379) if (noCompressionUserAgents != null) { MessageBytes userAgentValueMB = request.getMimeHeaders().getValue("user-agent"); String userAgentValue = userAgentValueMB.toString();
This has been fixed on the 5.5 tree for a little. I don't know when the next 5.0 release will be out.
It's also fixed on the 5.0 branch, but the fix was committed after the 5.0.30 release. Again, we don't know when 5.0.31 will come out. If you really need the fix, you can grab the code from CVS for the TOMCAT_5_0 branch and build yourself, or just add the one line of code that is the fix into your own custom Tomcat build... (Or move to 5.5 of course).