From 9803709edda598283487b85dfafa3b8f90f40674 Mon Sep 17 00:00:00 2001 From: Matt Butcher Date: Tue, 29 Jun 2021 13:31:31 -0600 Subject: [PATCH] add application/toml Signed-off-by: Matt Butcher --- mime-parse/src/constants.rs | 5 +++++ src/constants.rs | 1 + 2 files changed, 6 insertions(+) diff --git a/mime-parse/src/constants.rs b/mime-parse/src/constants.rs index 634c2bf3..e9956673 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 == TOML { + return Atoms::APPLICATION_TOML; + } }, 7 => { if sub == MSGPACK { @@ -406,6 +409,7 @@ names! { MSGPACK, "msgpack"; OCTET_STREAM, "octet-stream"; PDF, "pdf"; + TOML, "toml"; // common font/* WOFF, "woff"; @@ -465,6 +469,7 @@ mimes! { APPLICATION_OCTET_STREAM, "application/octet-stream", 11; APPLICATION_MSGPACK, "application/msgpack", 11; APPLICATION_PDF, "application/pdf", 11; + APPLICATION_TOML, "application/toml", 11; APPLICATION_DNS, "application/dns-message", 11; // media-ranges diff --git a/src/constants.rs b/src/constants.rs index af4376ec..edaa228f 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -108,6 +108,7 @@ mimes! { APPLICATION_OCTET_STREAM, "application/octet-stream"; APPLICATION_MSGPACK, "application/msgpack"; APPLICATION_PDF, "application/pdf"; + APPLICATION_TOML, "application/toml"; APPLICATION_DNS, "application/dns-message"; // media-ranges