| ... | @@ -2,6 +2,9 @@ const std = @import("std"); | ... | @@ -2,6 +2,9 @@ const std = @import("std"); |
| 2 | const string = []const u8; | 2 | const string = []const u8; |
| 3 | | 3 | |
| 4 | const types = std.ComptimeStringMap(string, .{ | 4 | const types = std.ComptimeStringMap(string, .{ |
| | 5 | .{ ".3g2", "video/3gpp2" }, |
| | 6 | .{ ".3gp", "video/3gpp" }, |
| | 7 | .{ ".7z", "application/x-7z-compressed" }, |
| 5 | .{ ".aac", "audio/aac" }, | 8 | .{ ".aac", "audio/aac" }, |
| 6 | .{ ".abw", "application/x-abiword" }, | 9 | .{ ".abw", "application/x-abiword" }, |
| 7 | .{ ".arc", "application/x-freearc" }, | 10 | .{ ".arc", "application/x-freearc" }, |
| ... | @@ -19,15 +22,15 @@ const types = std.ComptimeStringMap(string, .{ | ... | @@ -19,15 +22,15 @@ const types = std.ComptimeStringMap(string, .{ |
| 19 | .{ ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" }, | 22 | .{ ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" }, |
| 20 | .{ ".eot", "application/vnd.ms-fontobject" }, | 23 | .{ ".eot", "application/vnd.ms-fontobject" }, |
| 21 | .{ ".epub", "application/epub+zip" }, | 24 | .{ ".epub", "application/epub+zip" }, |
| 22 | .{ ".gz", "application/gzip" }, | | |
| 23 | .{ ".gif", "image/gif" }, | 25 | .{ ".gif", "image/gif" }, |
| | 26 | .{ ".gz", "application/gzip" }, |
| 24 | .{ ".htm", "text/html" }, | 27 | .{ ".htm", "text/html" }, |
| 25 | .{ ".html", "text/html" }, | 28 | .{ ".html", "text/html" }, |
| 26 | .{ ".ico", "image/vnd.microsoft.icon" }, | 29 | .{ ".ico", "image/vnd.microsoft.icon" }, |
| 27 | .{ ".ics", "text/calendar" }, | 30 | .{ ".ics", "text/calendar" }, |
| 28 | .{ ".jar", "application/java-archive" }, | 31 | .{ ".jar", "application/java-archive" }, |
| 29 | .{ ".jpg", "image/jpeg" }, | | |
| 30 | .{ ".jpeg", "image/jpeg" }, | 32 | .{ ".jpeg", "image/jpeg" }, |
| | 33 | .{ ".jpg", "image/jpeg" }, |
| 31 | .{ ".js", "application/javascript" }, | 34 | .{ ".js", "application/javascript" }, |
| 32 | .{ ".json", "application/json" }, | 35 | .{ ".json", "application/json" }, |
| 33 | .{ ".jsonld", "application/ld+json" }, | 36 | .{ ".jsonld", "application/ld+json" }, |
| ... | @@ -45,9 +48,9 @@ const types = std.ComptimeStringMap(string, .{ | ... | @@ -45,9 +48,9 @@ const types = std.ComptimeStringMap(string, .{ |
| 45 | .{ ".ogx", "application/ogg" }, | 48 | .{ ".ogx", "application/ogg" }, |
| 46 | .{ ".opus", "audio/opus" }, | 49 | .{ ".opus", "audio/opus" }, |
| 47 | .{ ".otf", "font/otf" }, | 50 | .{ ".otf", "font/otf" }, |
| 48 | .{ ".png", "image/png" }, | | |
| 49 | .{ ".pdf", "application/pdf" }, | 51 | .{ ".pdf", "application/pdf" }, |
| 50 | .{ ".php", "application/x-httpd-php" }, | 52 | .{ ".php", "application/x-httpd-php" }, |
| | 53 | .{ ".png", "image/png" }, |
| 51 | .{ ".ppt", "application/vnd.ms-powerpoint" }, | 54 | .{ ".ppt", "application/vnd.ms-powerpoint" }, |
| 52 | .{ ".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation" }, | 55 | .{ ".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation" }, |
| 53 | .{ ".rar", "application/vnd.rar" }, | 56 | .{ ".rar", "application/vnd.rar" }, |
| ... | @@ -73,9 +76,6 @@ const types = std.ComptimeStringMap(string, .{ | ... | @@ -73,9 +76,6 @@ const types = std.ComptimeStringMap(string, .{ |
| 73 | .{ ".xml", "application/xml" }, | 76 | .{ ".xml", "application/xml" }, |
| 74 | .{ ".xul", "application/vnd.mozilla.xul+xml" }, | 77 | .{ ".xul", "application/vnd.mozilla.xul+xml" }, |
| 75 | .{ ".zip", "application/zip" }, | 78 | .{ ".zip", "application/zip" }, |
| 76 | .{ ".3gp", "video/3gpp" }, | | |
| 77 | .{ ".3g2", "video/3gpp2" }, | | |
| 78 | .{ ".7z", "application/x-7z-compressed" }, | | |
| 79 | }); | 79 | }); |
| 80 | | 80 | |
| 81 | pub fn typeByExtension(comptime ext: string) ?string { | 81 | pub fn typeByExtension(comptime ext: string) ?string { |