mirror of
https://github.com/fafhrd91/actix-web
synced 2025-02-17 10:13:30 +01:00
Add html_utf8
content type. (#2423)
This commit is contained in:
parent
d13854505f
commit
855e260fdb
@ -1,6 +1,8 @@
|
|||||||
# Changes
|
# Changes
|
||||||
|
|
||||||
## Unreleased - 2021-xx-xx
|
## Unreleased - 2021-xx-xx
|
||||||
|
### 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
|
## 4.0.0-beta.10 - 2021-10-20
|
||||||
|
@ -74,10 +74,11 @@ impl ContentType {
|
|||||||
ContentType(mime::TEXT_PLAIN_UTF_8)
|
ContentType(mime::TEXT_PLAIN_UTF_8)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A constructor to easily create a `Content-Type: text/html` header.
|
/// A constructor to easily create a `Content-Type: text/html; charset=utf-8`
|
||||||
|
/// header.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn html() -> ContentType {
|
pub fn html() -> ContentType {
|
||||||
ContentType(mime::TEXT_HTML)
|
ContentType(mime::TEXT_HTML_UTF_8)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A constructor to easily create a `Content-Type: text/xml` header.
|
/// A constructor to easily create a `Content-Type: text/xml` header.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user