Closed ektrah closed 2 months ago
Hold for update; use these examples in a clarification.
More recently, with the terminology established in RFC 9193, we probably want to change the heading "Media-Type" to "Content-Type" as well.
draft-ietf-core-problem-details says:
In the registry as defined by {{Section 12.3 of -coap}} at the time of writing, the column "Content-Type" is called "Media type" and the column "Content Coding" is called "Encoding". [^remove]
Errata ID: 4954 Type: Editorial Reported By: Klaus Hartke Date Reported: 2017-02-28
Section 12.3 says/should say:
A CoAP Content-Format is the combination of an Internet Media Type with an HTTP Content Coding, as correctly explained in the first paragraphs of Section 12.3. However, the next paragraph (the original text above) incorrectly uses the term "content-encoding". The correct term is "content-coding", as shown in the corrected text.
Examples for valid CoAP Content-Format registrations:
media type "text/plain; charset=iso-8859-1" with content-coding "deflate"
media type "image/png" with content-coding "" (no content-coding)
media type "image/png" with content-coding "identity" (same as previous, no content-coding)
media type "application/example+xml" with content-coding "exi"
Examples for invalid CoAP Content-Format registrations:
media type "application/coap-group+json" with content-coding "UTF-8" (UTF-8 is a character encoding, not a content-coding; should be media type "application/coap-group+json; charset=utf-8" with content-coding "identity")
media type "audio/opus" with content-coding "identity" ("audio/opus" has a required parameter "rate"; should be media type "audio/opus; rate=48000" with content-coding "identity")
media type "application/example+xml" with content-coding "identity, exi" (too many content-codings; should be media type "application/example+xml" with content-coding "identity" and, separately, media type "application/example+xml" with content-coding "exi")
media type "application/example+exi" with content-coding "identity" ("+exi" is not a registered structured syntax suffix at the time of writing of this erratum)
media type "video/ogg" with content-coding "exi" (EXI is a content-coding for XML information)