From 2887efa1a812a1a133f1d09af393c7a8e039000b Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Wed, 16 Jun 2021 20:31:21 +0100 Subject: [PATCH] add application/wasm mime type closes #98 --- mime-parse/src/constants.rs | 6 +++++- src/constants.rs | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mime-parse/src/constants.rs b/mime-parse/src/constants.rs index 634c2bf..5231fa9 100644 --- a/mime-parse/src/constants.rs +++ b/mime-parse/src/constants.rs @@ -310,6 +310,9 @@ impl Atoms { if sub == JSON { return Atoms::APPLICATION_JSON; } + if sub == WASM { + return Atoms::APPLICATION_WASM; + } }, 7 => { if sub == MSGPACK { @@ -406,6 +409,7 @@ names! { MSGPACK, "msgpack"; OCTET_STREAM, "octet-stream"; PDF, "pdf"; + WASM, "wasm"; // common font/* WOFF, "woff"; @@ -466,6 +470,7 @@ mimes! { APPLICATION_MSGPACK, "application/msgpack", 11; APPLICATION_PDF, "application/pdf", 11; APPLICATION_DNS, "application/dns-message", 11; + APPLICATION_WASM, "application/wasm", 11; // media-ranges //@ MediaRange: @@ -475,4 +480,3 @@ mimes! { VIDEO_STAR, "video/*", 5; AUDIO_STAR, "audio/*", 5; } - diff --git a/src/constants.rs b/src/constants.rs index af4376e..8b1882d 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -109,6 +109,7 @@ mimes! { APPLICATION_MSGPACK, "application/msgpack"; APPLICATION_PDF, "application/pdf"; APPLICATION_DNS, "application/dns-message"; + APPLICATION_WASM, "application/wasm"; // media-ranges @ MediaRange: @@ -118,4 +119,3 @@ mimes! { VIDEO_STAR, "video/*"; AUDIO_STAR, "audio/*"; } -