diff --git a/src/header/common/content_type.rs b/src/header/common/content_type.rs index b77e475e3e..2949ec6e25 100644 --- a/src/header/common/content_type.rs +++ b/src/header/common/content_type.rs @@ -68,12 +68,18 @@ impl ContentType { ContentType(mime::TEXT_PLAIN_UTF_8) } - /// A constructor to easily create a `Content-Type: text/html; charset=utf-8` header. + /// 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/xml` header. + #[inline] + pub fn xml() -> ContentType { + ContentType(mime::TEXT_XML) + } + /// A constructor to easily create a `Content-Type: application/www-form-url-encoded` header. #[inline] pub fn form_url_encoded() -> ContentType {