I just tried this in DefaultServlet: if (contentType.equals("image/svg+xml") && path.toLowerCase().endsWith(".svgz")) { response.addHeader("Content-Encoding", "gzip"); }
"Quick & dirty", but Works fine as proof-of-concept. We just need a DefaultServlet expert to do the "slow & clean" stuff. I believe a generic solution to be best though, long-term. Something like: <mime-mapping> <extension>svgz</extension> <mime-type>image/svg+xml</mime-type> <encoding>gzip</encoding> </mime-mapping> ...with a new Tag, for example: "encoding" All the best, DaveLaw On 28/12/2013 18:06, David Law wrote:
Hi, 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 All the best, DaveLaw --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org