Type: New Feature
Affects Version/s: None
Fix Version/s: None
This arose from this discussion on the Tomcat users mailing list:
Compressed SVG files (*.svgz) require that the server sets the Content-Encoding header so that the user agent correctly renders the response.
I would like to see the Servlet specification extended to allow applications to specify a Content-Encoding header for resources with a given file extension.
Any setting of the Content-Encoding on the response would have to be mindful of any Accept-Encoding header sent by the user agent and the requirements of RFC 2616 section 14.3.
This is very like the <mime-mapping> element currently used to configure Content-Type.
I see two possible options:
1. Add support for something along these lines
2. Extend <mime-mapping> along these lines:
The second solution seems simpler but <mime-mapping> element would no longer be limited to MIME type mapping. The first solution is probably a better option.