diff --git a/CHANGES.md b/CHANGES.md index aeb6e83e0..3be41d468 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,8 @@ # Changes ## Unreleased - 2021-xx-xx -### Added -* `ContentType::html_utf8`, a constructor to easily create a `Content-Type: text/html; charset=utf-8` header; +### Changed +* `ContentType::html` now returns `Content-Type: text/html; charset=utf-8` instead of `Content-Type: text/html`. ## 4.0.0-beta.10 - 2021-10-20 diff --git a/src/http/header/content_type.rs b/src/http/header/content_type.rs index 6971f7d66..230460003 100644 --- a/src/http/header/content_type.rs +++ b/src/http/header/content_type.rs @@ -74,16 +74,10 @@ impl ContentType { ContentType(mime::TEXT_PLAIN_UTF_8) } - /// A constructor to easily create a `Content-Type: text/html` header. - #[inline] - pub fn html() -> ContentType { - ContentType(mime::TEXT_HTML) - } - /// A constructor to easily create a `Content-Type: text/html; charset=utf-8` /// header. #[inline] - pub fn html_utf8() -> ContentType { + pub fn html() -> ContentType { ContentType(mime::TEXT_HTML_UTF_8) }