From e54aeeae81f955f5a9c02875c5a5f67e1d09232f Mon Sep 17 00:00:00 2001 From: Josh Leeb-du Toit Date: Sat, 10 Oct 2020 15:57:45 +1100 Subject: [PATCH] Add application/xml This PR adds the constants `APPLICATION_XML = "application/xml"`, as listed in the [MDN docs of common mime types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types). --- mime-parse/src/constants.rs | 4 ++++ src/constants.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/mime-parse/src/constants.rs b/mime-parse/src/constants.rs index 634c2bf3..7d54002d 100644 --- a/mime-parse/src/constants.rs +++ b/mime-parse/src/constants.rs @@ -305,6 +305,9 @@ impl Atoms { if sub == PDF { return Atoms::APPLICATION_PDF; } + if sub == XML { + return Atoms::APPLICATION_XML; + } } 4 => { if sub == JSON { @@ -466,6 +469,7 @@ mimes! { APPLICATION_MSGPACK, "application/msgpack", 11; APPLICATION_PDF, "application/pdf", 11; APPLICATION_DNS, "application/dns-message", 11; + APPLICATION_XML, "application/xml", 11; // media-ranges //@ MediaRange: diff --git a/src/constants.rs b/src/constants.rs index af4376ec..88c6e682 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_XML, "application/xml"; // media-ranges @ MediaRange: