Support the specification of a content-encoding header for a resource based on file extension
- Dominant language
- Java
- Stars
- 325
- Forks
- 112
- PR merge metrics
- No merged PRs in 30d
Description
This arose from this discussion on the Tomcat users mailing list:
[http://tomcat.markmail.org/thread/6x7izjf7ltphhh7r](http://tomcat.markmail.org/thread/6x7izjf7ltphhh7r)
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 element currently used to configure Content-Type.
I see two possible options:
1\. Add support for something along these lines
svgz
gzip
2\. Extend along these lines:
svgz
image/svg+xml
gzip
The second solution seems simpler but element would no longer be limited to MIME type mapping. The first solution is probably a better option.
Contributor guide
Assessment
This issue has not been assessed yet.