It's really all just a simple mistake and the ;
is correct.
RFC 1867 was an experimental definition. All subsequent definitions have corrected this mistake. For example:
And finally... there is also an official correction to RFC 1867 to make it use the correct delimiter.
Rely on the newest RFC: 7231, section 3.1.1.1 says:
media-type = type "/" subtype *( OWS ";" OWS parameter )
This leaves no room for interpretations or custom formats.
Unfortunately, it's not the first case I see, when several RFCs conflicts one with another.
In this exact case, RFC 1049 is explicitly cover Content-type
header. RFC 2045 is referencing to RFC 1049. Moreover, RFC 2045 dated November 1996, so it's latest one.
Opposite case is covered in RFC 1867 very briefly.
So, I suggest to use semi-colon.
Note that your two conflicting examples aren't really contradictory. The first, RFC-1867, defines extensions to HTML. The other two, RFC-1049 and RFC-2045, both define extensions to the Internet Mail protocol.
For a REST API, I would probably go with RFC-1867, which was designed with HTML over HTTP in mind, as opposed to the other two, which were designed with RFC-822-based emails over SMTP/POP/IMAP in mind.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.