@@ -59,15 +59,27 @@ utf8_mime_const!(PLAIN, "Plain text", "text", "plain");
59
59
utf8_mime_const ! ( XML , "XML" , "application" , "xml" ) ;
60
60
mime_const ! ( ANY , "matching anything" , "*" , "*" ) ;
61
61
mime_const ! ( JSON , "JSON" , "application" , "json" ) ;
62
- mime_const ! ( SVG , "SVG" , "image" , "svg+xml" ) ;
63
- mime_const ! ( PNG , "PNG images" , "image" , "png" ) ;
64
- mime_const ! ( JPEG , "JPEG images" , "image" , "jpeg" ) ;
65
62
mime_const ! ( SSE , "Server Sent Events" , "text" , "event-stream" ) ;
66
63
mime_const ! ( BYTE_STREAM , "byte streams" , "application" , "octet-stream" ) ;
67
64
mime_const ! ( FORM , "forms" , "application" , "x-www-form-urlencoded" ) ;
68
65
mime_const ! ( MULTIPART_FORM , "multipart forms" , "multipart" , "form-data" ) ;
69
66
mime_const ! ( WASM , "webassembly" , "application" , "wasm" ) ;
67
+
68
+ // Images
69
+ // https://www.iana.org/assignments/media-types/media-types.xhtml#image
70
+ mime_const ! ( BMP , "BMP images" , "image" , "bmp" ) ;
71
+ mime_const ! ( JPEG , "JPEG images" , "image" , "jpeg" ) ;
72
+ mime_const ! ( PNG , "PNG images" , "image" , "png" ) ;
73
+ mime_const ! ( SVG , "SVG" , "image" , "svg+xml" ) ;
74
+ mime_const ! ( WEBP , "WebP images" , "image" , "webp" ) ;
70
75
// There are multiple `.ico` mime types known, but `image/x-icon`
71
76
// is what most browser use. See:
72
77
// https://en.wikipedia.org/wiki/ICO_%28file_format%29#MIME_type
73
78
mime_const ! ( ICO , "ICO icons" , "image" , "x-icon" ) ;
79
+
80
+ // Fonts
81
+ // https://www.iana.org/assignments/media-types/media-types.xhtml#font
82
+ mime_const ! ( OTF , "OTF" , "font" , "otf" ) ;
83
+ mime_const ! ( TTF , "TTF" , "font" , "ttf" ) ;
84
+ mime_const ! ( WOFF , "WOFF" , "font" , "woff" ) ;
85
+ mime_const ! ( WOFF2 , "WOFF2" , "font" , "woff2" ) ;
0 commit comments