# Map of known MIME types
class MediaTypes
+
+ # MIME types by extensions.
protected var types = new HashMap[String, String]
# Get the type/subtype associated to a file extension `ext`
types["htm"] = "text/html"
types["shtml"] = "text/html"
types["css"] = "text/css"
+ types["csv"] = "text/csv"
types["xml"] = "text/xml"
types["rss"] = "text/xml"
types["gif"] = "image/gif"
types["ico"] = "image/x-icon"
types["jng"] = "image/x-jng"
types["wbmp"] = "image/vnd.wap.wbmp"
+ types["gz"] = "application/gzip"
types["jar"] = "application/java-archive"
types["war"] = "application/java-archive"
types["ear"] = "application/java-archive"
end
end
+# MIME types list.
fun media_types: MediaTypes do return once new MediaTypes