Merge: doc: fixed some typos and other misc. corrections
[nit.git] / lib / nitcorn / media_types.nit
index 73c9626..49b6daa 100644 (file)
@@ -20,6 +20,8 @@ module media_types
 
 # 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`
@@ -35,6 +37,7 @@ class MediaTypes
                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"
@@ -48,9 +51,11 @@ class MediaTypes
                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"
+               types["json"]       = "application/json"
                types["hqx"]        = "application/mac-binhex40"
                types["pdf"]        = "application/pdf"
                types["cco"]        = "application/x-cocoa"
@@ -105,4 +110,5 @@ class MediaTypes
        end
 end
 
+# MIME types list.
 fun media_types: MediaTypes do return once new MediaTypes