Internet-Draft New Top-level Media Types November 2022
Dürst Expires 5 May 2023 [Page]
Workgroup:
MEDIAMAN
Internet-Draft:
draft-ietf-mediaman-toplevel-01
Updates:
6838 (if approved)
Published:
Intended Status:
Best Current Practice
Expires:
Author:
M.J. Dürst
Aoyama Gakuin University

Guidelines for the Definition of New Top-Level Media Types

Abstract

The goal of this document is to identify best practices for defining new top-level media types. It updates RFC 6838, when approved. Comments and discussion about this document should be directed to media-types@ietf.org, the mailing list of the Media Type Maintenance (mediaman) WG. Alternatively, issues can be raised on github at https://github.com/ietf-wg-mediaman/toplevel.

Status of This Memo

This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.

Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.

Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."

This Internet-Draft will expire on 5 May 2023.

1. Introduction

This document defines best practices for defining new top-level media types. RFC 6838 (Media Type Specifications and Registration Procedures) only summarily gave criteria for defining additional top-level media types. This document provides more detailled criteria for defining additional top-level media types. It therefore updates RFC 6838 (Media Type Specifications and Registration Procedures).

This document has been adopted by the Media Type Maintenance (mediaman) IETF WG. Comments and discussion about this document should be directed to the WG's mailing list at media-types@ietf.org. Alternatively, issues can be raised on github at https://github.com/ietf-wg-mediaman/toplevel.

1.1. Background

New top-level types are rare enough and different enough from each other that each application needs to be evaluated separately. The main protocol extension point for media types are subtypes below each of the main types. For formats that do not fit below any other top-level type, the 'application' top-level type can always be used.

The main function of media types and subtypes is the dispatch of data formats to application code. In most cases, this requires and is done using the full type (i.e. including the subtype, and often some parameters). The top-level type can occasionally serve as a fallback for the tentative dispatch to applications handling a very wide range of related formats.

In some older scenarios, it may also be possible to identify a device (e.g. a phone for audio messages, a printer or fax device for images, a video recorder for videos, a computer for 'application' subtypes). However, the current hardware landscape, where computers and smart phones can handle a very wide variety of media, makes such a scenario look somewhat far-fetched.

The top-level type can be used for user-directed information. Besides direct inspection of the type string by the user, this includes using different types of default icons for different top-level types.

1.2. Requirements Language

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].

2. Rules for the Registration of New Top-Level Media Types

This section describes the rules and criteria for new top-level media types, including criteria already defined in RFC 6838 (Media Type Specifications and Registration Procedures). Further work is needed to distinguish between required and optional criteria.

2.1. Required Criteria

The following is the list of required criteria for the definition of a new top-level type. Motivations for the requirements are also included.

  • Every new top-level type MUST be defined in a Standards Track RFC. This will make sure there is sufficient community interest, review, and consensus appropriate for a new top-level type.
  • The criteria for what types do and do not fall under the new top-level type need to be defined clearly. Clear criteria are expected to help expert reviewers to evaluate whether a subtype belongs below the new type or not, and whether the registration template for a subtype contains the approriate information. If the criteria cannot be defined clearly, this is a strong indication that whatever is being talked about is not suitable as a top-level type.
  • The document defining the new top-level type MUST include initial registrations of actual subtypes. This will help to show the need for the new top-level type, will allow to check the appropriateness of the definition of the new top-level type, and will avoid separate work for registering an initial slate of subtypes.
  • The registration and actual use of a certain number of subtypes under the new top-level type should be expected. At a minimum, one actual subtype should exist. But the existence of a single subtype should not be enough; it should be clear that new similar types may appear in the future. Otherwise, the creation of a new top-level type is most probably not justified.
  • The proposers of the new top-level type and the wider community should be willing to commit to emitting and consuming the new top-level type in environments that they control.

2.2. Additional Considerations

  • Existing wide use of an undefined top-level type may be an indication of a need, and therefore an argument for formally defining this new top-level type.
  • On the other hand, the use of undefined top-level types is highly discouraged.
  • Use of an IETF WG to define a new top-level type is not be needed, but may be advisable in some cases. There are examples of new top-level type definitions without a WG (RFC 2077 [RFC2077]), with a short, dedicated WG (RFC 8081 [RFC8081]), and with a WG that included other related work (draft-ietf-mediaman-haptics [HAPTICS]).
  • Desirability for common parameters: The fact that a group of (potential) types have (mostly) common parameters may be an indication that these belong under a common new top-level type.
  • Top-level types can help humans with understading and debugging. Therefore, evaluating how a new top-level type helps humans understand types may be crucial. But as often with humans, opinions may widely differ.
  • Common restrictions may apply to all subtypes of a top-level type. Examples are the restriction to CRLF line endings for subtypes of type 'text' (at least in the context of electronic mail), or on subtypes of type 'multipart'.
  • Top-level types are also used frequently in dispatching code. For example "multipart/*" is frequently handled as multipart/mixed, without understanding of a specific subtype. The top-level media types 'image', 'audio', and 'video' are also often handled generically. Documents with these top-level media types can be passed to applications handling a wide variety of image, audio, or video formats. HTML generating applications can select different HTML elements (e.g. <img> or <audio>) for including data of different top-level types. Applications can select different icons to represent unknown types in different top-level types.

2.3. Negative Criteria

This subsection lists negative criteria for top-level types, identifying criteria that are explicitly not reasons for a top-level type registration.

  • A top-level type is not a pointer into another registration space that offers duplicate registrations for existing media types. Example: a top lever type of 'oid', leading to types of the form oid/nnnnn, where nnn is an OID designating a specific media format,
  • A top-level type must not be defined for the mapping of other protocol elements to media types. For example, while there may be some merit to a mapping from media types to URIs, e.g. in the context of RDF, there is very limited merit in a reverse mapping, and even less merit in creating a top-level type for such a mapping. The same applies to other protocol elements such as file extensions or URI schemes. The recommended solution in case a mapping is needed is to choose a single type/subtype and put the additional information in an appropriately named parameter. As an example, information on a file extension '.dcat' can be encoded as 'application/octet-string; filename=foo.dcat'.
  • A new top-level type should not generate aliases for existing widely used types or subtypes.
  • Top-level types with an "X-" prefix neither should be used, nor can such types be registered. This is in line with RFC RFC 6648 [RFC6648].

3. Top-Level Media Type History

This section shortly describes the history of top-level media types. The emphasis is on the aspects of the history that are relevant to the (rather rare) adoption of new top-level types when writing this document.

RFC 1341 [RFC1341] first defined the structuring of content types into (top-level) type and subtype, and introduced the 'text', 'multipart', 'message', 'image', 'audio', 'video', and 'application' top-level types. That specification also allowed top-level types starting with 'X-'. With respect to new top-level types, it said the following:

An initial set of seven Content-Types is defined by this document. This set of top-level names is intended to be substantially complete. It is expected that additions to the larger set of supported types can generally be accomplished by the creation of new subtypes of these initial types. In the future, more top-level types may be defined only by an extension to this standard. If another primary type is to be used for any reason, it must be given a name starting with "X-" to indicate its non-standard status and to avoid a potential conflict with a future official name.

The first time an additional top-level type was defined was in RFC 1437 [RFC1437], but this was purely for entertainment purposes (please check date).

RFC 2046 [RFC2046] discouraged the use of "X-" for (new) top-level types, with the following words:

In general, the use of "X-" top-level types is strongly discouraged. Implementors should invent subtypes of the existing types whenever possible. In many cases, a subtype of "application" will be more appropriate than a new top-level type.

RFC 2048 [RFC2048], published at the same time as RFC 2046 [RFC2046], defined requirements for the definition of new top-level types:

In some cases a new media type may not "fit" under any currently defined top-level content type. Such cases are expected to be quite rare. However, if such a case arises a new top-level type can be defined to accommodate it. Such a definition must be done via standards-track RFC; no other mechanism can be used to define additional top-level content types.

The 'model' top-level type was introduced by RFC 2077 [RFC2077] in 1997.

RFC 4735 [RFC4735] introduced the 'example' top-level type for use in documentation examples.

The 'font' top-level media type was defined in RFC 8081 [RFC8081], a work of the 'justfont' IETF WG, in 2017. This was formalizing the widespread use of the unofficial 'font' top level type which people were using in preference to official, registered types.

There is ongoing work on defining a new 'haptics' top-level media type in draft-ietf-mediaman-haptics [HAPTICS].

A Wikipedia (at https://en.wikipedia.org/wiki/Chemical_file_format) reports the unofficial use of a 'chemical' top-level type. This top-level type was proposed by Peter Murray-Rust and Henry Rzepa at a workshop at the First WWW conference in May 1994 CHEMIME [CHEMIME]. It is in widespread use, but remains unregistered.

Some Linux desktop logic uses what looks like a top-level type of 'x-scheme-handler' to map URI schemes to applications. In addition, the type 'inode/directory' is used. However, this is a purely local, system-specific use, not intended for exchange. If exchange or standardization are desired, a change from e.g. 'x-scheme-handler/http' to something like 'application/scheme-handler; scheme=http' or 'inode/directory' to 'multipart/inode-directory' or 'application/inode-directory (in all cases, properly registered) is strongly recommened.

The document currently defining the requirements for new top-level media types is RFC 6838 [RFC6838]. Of particular relevance to the work in this document are Section 4.2.5 (Application Media Types) and Section 4.2.7 (Additional Top-Level Types). These two sections are not strictly aligned, because the first says that anything that doesn't go under a more specific type can go under the 'application' top-level type, while the later section allows for new top-level types.

4. IANA Considerations

There is currently no registry of top-level media types, but the list of top-level types available for registering subtypes is available at https://www.iana.org/assignments/media-types/media-types.xhtml.

ISSUE: Is there a need for a formal registry of top-level types. Such a registry would contain pointers to the definitions of the top-level types, and pointers to the list of subtypes. As a concrete reason for the need, the author of this document had difficulties to find the definition of the 'model' top-level type.

5. Security Considerations

This document as such is not expected to introduce any security issues. The security issues of introducing a new top-level media type MUST be evaluated and documented carefully.

Changelog

RFC Editor, please remove this section before publication.

Changes from draft-ietf-mediaman-toplevel-00 to draft-ietf-mediaman-toplevel-01

  • In the Introduction, add a Background section.
  • Reorganized so that criteria come first, and split criteria section into various subsections.
  • Add reasons to criteria.
  • Fixes to status and related text pieces.
  • Cosmetic fixes, in particular getting rid of 'references in your face' (e.g. "RFC ABCD [RFC ABCD]") little by little.

Changes from draft-duerst-mediaman-toplevel-00 to draft-ietf-mediaman-toplevel-01

  • Add reference to RFC 2077 [RFC2077] for definition of 'model' type.
  • Add examples of use of top-level types for dispatch.
  • Remove a stray '>' before the mention of RFC 4735 [RFC4735].
  • Change link to chemical/* Wikipedia page.
  • Remove reference in abstract (pointed out by idnits).

Acknowledgements

Continuous encouragement for writing this draft came from Harald Alvestrand. Further encouragement was provided by Murray S. Kucherawy. Both Harald and Murray also provided ideas for actual text. Without them, this memo would never have reached even the first draft stage. Alexey Melnikov provided the difficult to find pointer to RFC 2077 [RFC2077] and examples for applications dispatching on top-level media types. Additional information and comments were received from Chris Lilley, Graham Kline, and Henry S. Rzepa. Inspiration for negative criteria or examples was provided by Phillip Hallam-Baker, Donald E. Eastlake 3rd, and Petter Reinholdtsen.

References

Normative References

[RFC2119]
Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, , <https://www.rfc-editor.org/info/rfc2119>.
[RFC6838]
Freed, N., Klensin, J., and T. Hansen, "Media Type Specifications and Registration Procedures", BCP 13, RFC 6838, DOI 10.17487/RFC6838, , <https://www.rfc-editor.org/info/rfc6838>.

Informative References

[CHEMIME]
Rzepa, H.S., Murray-Rust, P., and B. Whitaker, "The Application of Chemical Multipurpose Internet Mail Extensions (Chemical MIME) Internet Standards to Electronic Mail and World Wide Web Information Exchange", DOI 10.1021/ci9803233, , <https://pubs.acs.org/doi/10.1021/ci9803233>.
[HAPTICS]
Muthusamy, Y. K. and C. Ullrich, "The 'haptics' Top-level Media Type", RFC XXXX, <https://datatracker.ietf.org/doc/draft-ietf-mediaman-haptics/>.
[RFC1341]
Borenstein, N. and N. Freed, "MIME (Multipurpose Internet Mail Extensions): Mechanisms for Specifying and Describing the Format of Internet Message Bodies", RFC 1341, DOI 10.17487/RFC1341, , <https://www.rfc-editor.org/info/rfc1341>.
[RFC1437]
Borenstein, N. and M. Linimon, "The Extension of MIME Content-Types to a New Medium", RFC 1437, DOI 10.17487/RFC1437, , <https://www.rfc-editor.org/info/rfc1437>.
[RFC2046]
Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, DOI 10.17487/RFC2046, , <https://www.rfc-editor.org/info/rfc2046>.
[RFC2048]
Freed, N., Klensin, J., and J. Postel, "Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures", RFC 2048, DOI 10.17487/RFC2048, , <https://www.rfc-editor.org/info/rfc2048>.
[RFC2077]
Nelson, S., Parks, C., and Mitra., "The Model Primary Content Type for Multipurpose Internet Mail Extensions", RFC 2077, DOI 10.17487/RFC2077, , <https://www.rfc-editor.org/info/rfc2077>.
[RFC4735]
Taylor, T., "Example Media Types for Use in Documentation", RFC 4735, DOI 10.17487/RFC4735, , <https://www.rfc-editor.org/info/rfc4735>.
[RFC6648]
Saint-Andre, P., Crocker, D., and M. Nottingham, "Deprecating the "X-" Prefix and Similar Constructs in Application Protocols", BCP 178, RFC 6648, DOI 10.17487/RFC6648, , <https://www.rfc-editor.org/info/rfc6648>.
[RFC8081]
Lilley, C., "The "font" Top-Level Media Type", RFC 8081, DOI 10.17487/RFC8081, , <https://www.rfc-editor.org/info/rfc8081>.

Author's Address

Martin J. Dürst
Aoyama Gakuin University
Fuchinobe 5-10-1, Chuo-ku, Sagamihara, Kanagawa
252-5258
Japan