From f2927387616c61e20dd1af61e231750bf53327f2 Mon Sep 17 00:00:00 2001 From: Ezra Celli Date: Sat, 4 Jul 2020 13:43:58 -0400 Subject: [PATCH] add constant WWW_FORM_URLENCODED_UTF_8 --- 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..a928b4f4 100644 --- a/mime-parse/src/constants.rs +++ b/mime-parse/src/constants.rs @@ -170,6 +170,9 @@ impl Atoms { if sub == JAVASCRIPT { return Atoms::APPLICATION_JAVASCRIPT_UTF_8; } + if sub == WWW_FORM_URLENCODED { + return Atoms::APPLICATION_WWW_FORM_URLENCODED_UTF_8; + } } Atoms::dynamic(s) @@ -462,6 +465,7 @@ mimes! { APPLICATION_JAVASCRIPT, "application/javascript", 11; APPLICATION_JAVASCRIPT_UTF_8, "application/javascript; charset=utf-8", 11, None, 22; APPLICATION_WWW_FORM_URLENCODED, "application/x-www-form-urlencoded", 11; + APPLICATION_WWW_FORM_URLENCODED_UTF_8, "application/x-www-form-urlencoded; charset=utf-8", 11, None, 33; APPLICATION_OCTET_STREAM, "application/octet-stream", 11; APPLICATION_MSGPACK, "application/msgpack", 11; APPLICATION_PDF, "application/pdf", 11; diff --git a/src/constants.rs b/src/constants.rs index af4376ec..00404a7b 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -105,6 +105,7 @@ mimes! { APPLICATION_JAVASCRIPT, "application/javascript"; APPLICATION_JAVASCRIPT_UTF_8, "application/javascript; charset=utf-8"; APPLICATION_WWW_FORM_URLENCODED, "application/x-www-form-urlencoded"; + APPLICATION_WWW_FORM_URLENCODED_UTF_8, "application/x-www-form-urlencoded; charset=utf-8"; APPLICATION_OCTET_STREAM, "application/octet-stream"; APPLICATION_MSGPACK, "application/msgpack"; APPLICATION_PDF, "application/pdf";