From ec568e9a551018b3353b6754eb2fcd729c7ea3c6 Mon Sep 17 00:00:00 2001 From: Garrett Squire Date: Tue, 8 Mar 2016 17:41:34 -0800 Subject: [PATCH] fix(headers): remove charset from `ContentType::json()` convenience method since the JSON mime type does not accept a charset, this patch removes it closes https://github.com/hyperium/hyper/issues/737 --- src/header/common/content_type.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/header/common/content_type.rs b/src/header/common/content_type.rs index 1350cbb979..cb530f7879 100644 --- a/src/header/common/content_type.rs +++ b/src/header/common/content_type.rs @@ -61,7 +61,7 @@ impl ContentType { /// A constructor to easily create a `Content-Type: application/json; charset=utf-8` header. #[inline] pub fn json() -> ContentType { - ContentType(mime!(Application/Json; Charset=Utf8)) + ContentType(mime!(Application/Json)) } /// A constructor to easily create a `Content-Type: text/plain; charset=utf-8` header.