From 68a12f3547bc1c37f0f77b35cdf98426c6384c2b Mon Sep 17 00:00:00 2001 From: Mason Fischer Date: Tue, 17 Dec 2019 19:06:49 -0500 Subject: [PATCH] Add CBOR MIME type --- mime-parse/src/constants.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mime-parse/src/constants.rs b/mime-parse/src/constants.rs index 634c2bf3..d8d77341 100644 --- a/mime-parse/src/constants.rs +++ b/mime-parse/src/constants.rs @@ -309,6 +309,8 @@ impl Atoms { 4 => { if sub == JSON { return Atoms::APPLICATION_JSON; + } else if sub == CBOR { + return Atoms::APPLICATION_CBOR; } }, 7 => { @@ -401,6 +403,7 @@ names! { TAB_SEPARATED_VALUES, "tab-separated-values"; // common application/* + CBOR, "cbor"; JSON, "json"; WWW_FORM_URLENCODED, "x-www-form-urlencoded"; MSGPACK, "msgpack"; @@ -458,6 +461,7 @@ mimes! { FONT_WOFF, "font/woff", 4; FONT_WOFF2, "font/woff2", 4; + APPLICATION_CBOR, "application/cbor", 11; APPLICATION_JSON, "application/json", 11; APPLICATION_JAVASCRIPT, "application/javascript", 11; APPLICATION_JAVASCRIPT_UTF_8, "application/javascript; charset=utf-8", 11, None, 22;