Christopher Schultz wrote:
Hash: SHA256


On 12/28/13, 12:06 PM, David Law wrote:
Tomcat doesn't seem to serve compressed SVG's (*.svgz) correctly. The response should have a Content-Encoding header, value 'gzip'.

Any chance of getting this at long last? (a change to
org.apache.catalina.servlets.DefaultServlet, I presume)

Version: 7.0.47

What type of data do you have on the disk? What content-type? What
content-type and content-encoding are sent to the browser?

Tomcat's DefaultServlet should serve any file using gzip (with an
appropriate content-encoding) that matches the configured mime types
and isn't smaller than a certain size. All of these can be configured
with the compression, compressableMimeType, and compressionMinSize
attributes on your <Connector>. Note that use of sendFile precludes
the use of gzip compression, so if you are using sendFile you aren't
going to get that kind of encoding.

- From a stock Tomcat install, to get .svg files served using
content-encoding:gzip, you'd need to modify your <Connector> to have
the following attributes:

   compressableMimeType="...., image/svg+xml"
   compressionMinSize="[big enough to exceed your file size"

I believe that this should be instead : [small enough to *not* exceed you file 
No ?

   sendFile="false" (if appropriate)

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

Reply via email to