I'm just designing the schema for a database table which will hold details of email attachments - their size in bytes, filename and content-type (i.e. "image/jpg", "audio/mp3", etc).
Does anybody know the maximum length that I can expect a content-type to be?
I hope I havn't misread, but it looks like the length is max 127/127 or 255 total.
RFC 4288 has a reference 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 the +suffix can add past the 127, but it appears not.