ietf-corpus

rfc-2183

Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field

R. Troost, S. Dorner, K. Moore (Editor)
date1997-08 streamLegacy statusPROPOSED STANDARD pages12 canonicalhttps://www.rfc-editor.org/rfc/rfc2183 doi10.17487/RFC2183 errataview
This memo provides a mechanism whereby messages conforming to the MIME specifications [RFC 2045, RFC 2046, RFC 2047, RFC 2048, RFC 2049] can convey presentational information. It specifies the "Content- Disposition" header field, which is optional and valid for any MIME entity ("message" or "body part"). [STANDARDS-TRACK]

obsoletes

updated by

Extracted elements (23)

design-rationale §2.3

No provision is made for specifying directory path information in the filename parameter; portable specification of directory paths is deferred to a possible future Content-Disposition parameter. The current parameter is intentionally terminal-component-only.

email

design-rationale §2.3

The filename parameter is permitted on 'inline' body parts as well as 'attachment' parts. These parts will not normally be written to files, but the parameter provides a filename if the receiving user chooses to save the part.

email

design-rationale §2

The set of possible disposition types is intentionally kept small and well defined to avoid needless complexity, while the set is made extensible via IANA registration to accommodate evolving usage.

email

design-rationale §2.8

Unrecognized disposition types are treated as 'attachment' rather than 'inline' because a sender who goes to the trouble of producing a Content-Disposition header with a novel type is more likely aiming for something more elaborate than inline presentation.

email

interoperability-note §2

Content-Disposition is an optional header; in its absence, the MUA may use whatever presentation method it deems suitable. MIME content-type parameters are per-content-type, whereas Content-Disposition parameters are valid for all dispositions.

email

interoperability-note §2.9

If a Content-Disposition header is used on a multipart body part, it applies to the multipart as a whole, not the individual subparts. Subpart dispositions should not be consulted until the multipart itself is presented.

email

interoperability-note §2.10

It is permissible to use Content-Disposition on the main body of an RFC 822 message, not only on MIME body parts.

email

normative-requirement §2 MUST

Contents of quoted-date-time fields MUST be an RFC 822 date-time, and numeric timezones (+HHMM or -HHMM) MUST be used rather than named timezone abbreviations.

email

normative-requirement §9 REQUIRED

New Content-Disposition values beyond 'inline' and 'attachment' may be defined only by Internet standards-track documents, or in Experimental documents approved by the IESG.

email, registry

normative-requirement §2 MUST

Parameter values longer than 78 characters, or which contain non-ASCII characters, MUST be encoded as specified in RFC 2184. Short values with only non-tspecials characters SHOULD be a single token; short ASCII values with tspecials SHOULD be quoted-string.

email

normative-requirement §2.3 SHOULD

The receiving MUA SHOULD check (and possibly change) the suggested filename to ensure it conforms to local filesystem conventions, does not overwrite an existing file, and does not present a security problem.

email, security

normative-requirement §2.3 SHOULD NOT

The receiving MUA SHOULD NOT respect any directory path information that may appear in the filename parameter. The filename should be treated as a terminal component only.

email, security

normative-requirement §2.8 SHOULD

Unrecognized Content-Disposition parameters SHOULD be ignored. Unrecognized disposition types SHOULD be treated as 'attachment'.

email

protocol-element §2.2

The 'attachment' disposition type designates a body part as separate from the main mail body; its display should not be automatic but contingent upon further user action. MUAs may present attachments as icons or a selectable list.

email

protocol-element §2.4

The 'creation-date' parameter MAY indicate the date at which the file was created. Its value MUST be a quoted-string containing an RFC 822 date-time. UNIX implementors are cautioned that st_ctime is not the creation time and is inappropriate as a source value.

email

protocol-element §2.3

The 'filename' parameter suggests a filename to use if the entity is detached and stored in a separate file. It is valid for any disposition type, including 'inline', and its presence does not force an implementation to write the entity to a file.

email

protocol-element §2.1

The 'inline' disposition type indicates a body part is intended to be displayed automatically upon display of the message. Inline body parts should be presented in the order in which they occur, subject to normal multipart semantics.

email

protocol-element §2.5

The 'modification-date' parameter MAY indicate the date at which the file was last modified. Its value MUST be a quoted-string containing an RFC 822 date-time representation of the last modification date.

email

protocol-element §2.6

The 'read-date' parameter MAY indicate the date at which the file was last read. Its value MUST be a quoted-string containing an RFC 822 date-time representation of the last-read date.

email

protocol-element §2.7

The 'size' parameter indicates an approximate size of the file in octets (encoded as 1*DIGIT). It can be used to pre-allocate space before storing or to check whether sufficient space exists.

email

registry §9

New Content-Disposition disposition-type values (beyond 'inline' and 'attachment') require standards-track or IESG-approved Experimental RFC publication. New parameters may be registered with IANA by submitting a template specifying parameter name, allowable values, and description to IANA@IANA.ORG.

email, registry

security-consideration §5

A receiving MUA must take care that the sender's suggested filename does not represent a hazard, including creating startup or system files, overwriting existing files, placing executables in command search paths, or sending files to a pipe. The MUA should not name or place the file such that it will be interpreted or executed without explicit user action.

email, security

wire-format §2

Content-Disposition header field is defined in RFC 822 extended BNF as: disposition-type ('inline' | 'attachment' | extension-token) followed by zero or more semicolon-separated disposition-parm values (filename-parm, creation-date-parm, modification-date-parm, read-date-parm, size-parm, or generic parameter). Disposition-type values are not case-sensitive.

email