From 5061b8d74da9a470b96848979ca1347bfd5b6ca1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 20 Apr 2026 03:24:07 +0000 Subject: [PATCH] Add application/wasm MIME type for .wasm files Agent-Logs-Url: https://github.com/patrickdappollonio/http-server/sessions/00f6c6dd-4e7c-4a07-b760-359664949021 Co-authored-by: patrickdappollonio <930925+patrickdappollonio@users.noreply.github.com> --- internal/ctype/ctypes.go | 1 + internal/ctype/ctypes_test.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/internal/ctype/ctypes.go b/internal/ctype/ctypes.go index 0397aff..b011594 100644 --- a/internal/ctype/ctypes.go +++ b/internal/ctype/ctypes.go @@ -195,6 +195,7 @@ var ctypes = []struct { {[]string{".srt"}, nil, "application/x-subrip"}, {[]string{".sql"}, nil, "application/sql"}, {[]string{".tgz"}, nil, "application/x-gzip"}, + {[]string{".wasm"}, nil, "application/wasm"}, } func GetContentTypeForFilename(name string) string { diff --git a/internal/ctype/ctypes_test.go b/internal/ctype/ctypes_test.go index 145637f..d0237c9 100644 --- a/internal/ctype/ctypes_test.go +++ b/internal/ctype/ctypes_test.go @@ -51,6 +51,10 @@ func Test_getContentTypeForExtension(t *testing.T) { filename: "Makefile", want: "text/x-makefile", }, + { + filename: ".wasm", + want: "application/wasm", + }, } for _, tt := range tests { t.Run(tt.filename, func(t *testing.T) {