Should the Content-Type
header in a REST API web request be formatted with a comma as in RFC 1867:
Content-type: multipart/form-data, boundary=AaB03x
Or with a semicolon, as in RFC 1049 and RFC 2045:
Content-Type: multipart/mixed; boundary=gc0p4Jq0M2Yt08j34c0p
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With