[ACCEPTED]-Maximum length of a MIME Content-Type header field?-mime
I hope I havn't misread, but it looks like 4 the length is max 127/127 or 255 total.
RFC 4288 has a reference 3 in 4.2 (page 6):
Type and subtype names MUST conform to the following ABNF:
type-name = reg-name
subtype-name = reg-name
reg-name = 1*127reg-name-chars
reg-name-chars = ALPHA / DIGIT / "!" /
"#" / "$" / "&" / "." /
"+" / "-" / "^" / "_"
It is not clear to me if 2 the +suffix can add past the 127, but it 1 appears not.
In RFC 6838 which is latest standard and 7 obsoletes RFC4288, there is a following 6 statement.
"Also note that while this 5 syntax allows names of up to 127 characters, implementation 4 limits may make such long names problematic. For 3 this reason, <type-name>
and <subtype-name>
SHOULD be limited to 2 64 characters."
64+1+64 = 129.
But I 1 suspect the standard should mean 63+1+63=127.
We run an SaaS system that allows users 8 to upload files. We'd originally designed 7 it to store MIME Types up to 50 characters. In 6 the last several days we've seen several 5 attempts to upload 71-bytes types. So, we're 4 changing to 250. 100 seemed "good" but it's 3 only a few more than the max we're seeing 2 now. 500 seems silly, so 250 is the selected 1 one.
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.