From 0dff46865cb0a1211caffa596ff0c66e276dc97c Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Sat, 10 Aug 2019 13:00:55 -0700 Subject: [PATCH] web-ui: Fix content-type of library wasm --- cli/src/web_ui.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cli/src/web_ui.rs b/cli/src/web_ui.rs index 7ebced86..c64fda0f 100644 --- a/cli/src/web_ui.rs +++ b/cli/src/web_ui.rs @@ -46,9 +46,9 @@ pub fn serve(grammar_path: &Path) { let html = HTML .replace("THE_LANGUAGE_NAME", &grammar_name) .into_bytes(); - let html_header = Header::from_str("Content-type: text/html").unwrap(); - let js_header = Header::from_str("Content-type: application/javascript").unwrap(); - let wasm_header = Header::from_str("Content-type: application/wasm").unwrap(); + let html_header = Header::from_str("Content-Type: text/html").unwrap(); + let js_header = Header::from_str("Content-Type: application/javascript").unwrap(); + let wasm_header = Header::from_str("Content-Type: application/wasm").unwrap(); for request in server.incoming_requests() { let res = match request.url() { @@ -66,7 +66,7 @@ pub fn serve(grammar_path: &Path) { if cfg!(windows) { redirect("https://tree-sitter.github.io/tree-sitter.wasm") } else { - response(LIB_WASM, &js_header) + response(LIB_WASM, &wasm_header) } } _ => response(b"Not found", &html_header).with_status_code(404),