Skip to content

Commit e9606a7

Browse files
added web assembly suport
1 parent 0918452 commit e9606a7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/extras/fdefine.extras.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ const char *cweb_generate_content_type(const char *file_name, bool is_binary) {
108108
if (strcmp(lower_ext, "rar") == 0) return "application/vnd.rar";
109109
if (strcmp(lower_ext, "7z") == 0) return "application/x-7z-compressed";
110110

111+
// WebAssembly
112+
if (strcmp(lower_ext, "wasm") == 0) return "application/wasm";
113+
if (strcmp(lower_ext, "wat") == 0) return "text/plain";
114+
111115
// Microsoft Office
112116
if (strcmp(lower_ext, "doc") == 0) return "application/msword";
113117
if (strcmp(lower_ext, "docx") == 0) return "application/vnd.openxmlformats-officedocument.wordprocessingml.document";

0 commit comments

Comments
 (0)