This adds the mime type `image/svg+xml` to the whitelist of compressible mime types for the tornado.web.GZipContentEncoding class.
SVG images are served with the mime type `image/svg+xml`, but are not compressed by the GZipContentEncoding transform. My first thought was to add all mime types ending with `+xml`, but that might need a bit more research.
# beginning with "text/").
CONTENT_TYPES = set(["application/javascript", "application/x-javascript",
"application/xml", "application/atom+xml",
- "application/json", "application/xhtml+xml"])
+ "application/json", "application/xhtml+xml",
+ "image/svg+xml"])
# Python's GzipFile defaults to level 9, while most other gzip
# tools (including gzip itself) default to 6, which is probably a
# better CPU/size tradeoff.