Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mime-parse/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,8 @@ impl Atoms {
4 => {
if sub == JSON {
return Atoms::APPLICATION_JSON;
} else if sub == CBOR {
return Atoms::APPLICATION_CBOR;
}
},
7 => {
Expand Down Expand Up @@ -401,6 +403,7 @@ names! {
TAB_SEPARATED_VALUES, "tab-separated-values";

// common application/*
CBOR, "cbor";
JSON, "json";
WWW_FORM_URLENCODED, "x-www-form-urlencoded";
MSGPACK, "msgpack";
Expand Down Expand Up @@ -458,6 +461,7 @@ mimes! {
FONT_WOFF, "font/woff", 4;
FONT_WOFF2, "font/woff2", 4;

APPLICATION_CBOR, "application/cbor", 11;
APPLICATION_JSON, "application/json", 11;
APPLICATION_JAVASCRIPT, "application/javascript", 11;
APPLICATION_JAVASCRIPT_UTF_8, "application/javascript; charset=utf-8", 11, None, 22;
Expand Down