From 200e5d5e4748771a50ddf70f86b40aaf379224da Mon Sep 17 00:00:00 2001 From: giles Date: Tue, 31 Mar 2026 17:00:44 +0000 Subject: [PATCH] Add .sxbc MIME type to OCaml HTTP server static file handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stops 404s for bytecoded module files — the server now serves .sxbc files with the correct content type. Co-Authored-By: Claude Opus 4.6 (1M context) --- hosts/ocaml/bin/sx_server.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/ocaml/bin/sx_server.ml b/hosts/ocaml/bin/sx_server.ml index 597fd354..0e4eed5c 100644 --- a/hosts/ocaml/bin/sx_server.ml +++ b/hosts/ocaml/bin/sx_server.ml @@ -1639,6 +1639,7 @@ let mime_type_of path = else if Filename.check_suffix path ".woff2" then "font/woff2" else if Filename.check_suffix path ".woff" then "font/woff" else if Filename.check_suffix path ".sx" then "text/sx; charset=utf-8" + else if Filename.check_suffix path ".sxbc" then "text/sx; charset=utf-8" else "application/octet-stream" let static_cache : (string, string) Hashtbl.t = Hashtbl.create 256