diff --git a/src/header/common/content_type.rs b/src/header/common/content_type.rs index 7f37581b99..41179b5699 100644 --- a/src/header/common/content_type.rs +++ b/src/header/common/content_type.rs @@ -95,6 +95,12 @@ impl ContentType { pub fn png() -> ContentType { ContentType(mime!(Image/Png)) } + + /// A constructor to easily create a `Content-Type: application/octet-stream` header. + #[inline] + pub fn octet_stream() -> ContentType { + ContentType(mime!(Application/OctetStream)) + } } impl Eq for ContentType {}