diff options
author | 2022-08-22 09:14:05 -0700 | |
---|---|---|
committer | 2022-08-22 09:14:41 -0700 | |
commit | 38071ce9d5ce8d2c17ced0786d422906924eabe8 (patch) | |
tree | e21414a75e8ced58939ada4b46868991b668bf63 /src | |
parent | 8642ac8e86f0cb328b570957abfdfbb964e73492 (diff) | |
download | bun-38071ce9d5ce8d2c17ced0786d422906924eabe8.tar.gz bun-38071ce9d5ce8d2c17ced0786d422906924eabe8.tar.zst bun-38071ce9d5ce8d2c17ced0786d422906924eabe8.zip |
Update mime_type.zig
Diffstat (limited to 'src')
-rw-r--r-- | src/http/mime_type.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/http/mime_type.zig b/src/http/mime_type.zig index 5d0c02c0a..294fc18d8 100644 --- a/src/http/mime_type.zig +++ b/src/http/mime_type.zig @@ -2494,6 +2494,12 @@ pub const all = struct { pub const @"x-shader/x-vertex": MimeType = MimeType{ .category = .@"x-shader", .value = "x-shader/x-vertex" }; }; +// TODO: do a comptime static hash map for this +// its too many branches to use ComptimeStringMap +pub fn byName(name: []const u8) MimeType { + return MimeType.init(name); +} + pub const extensions = ComptimeStringMap(MimeType, .{ .{ "123", all.@"application/vnd.lotus-1-2-3" }, .{ "1km", all.@"application/vnd.1000minds.decision-model+xml" }, |