draft-ietf-acap-mediatype-00.txt   draft-ietf-acap-mediatype-01.txt 
Network Working Group C. Newman Network Working Group C. Newman
Internet Draft: ACAP Media Type Dataset Class Innosoft Internet Draft: ACAP Media Type Dataset Class Innosoft
Expires in six months Document: draft-ietf-acap-mediatype-01.txt A. Melnikov
Expires in six months Epsylon Technologies
December 1998
ACAP Media Type Dataset Class ACAP Media Type Dataset Class
Status of this memo Status of this memo
This document is an Internet-Draft. Internet-Drafts are working This document is an Internet-Draft. Internet-Drafts are working
documents of the Internet Engineering Task Force (IETF), its areas, documents of the Internet Engineering Task Force (IETF), its areas,
and its working groups. Note that other groups may also distribute and its working groups. Note that other groups may also distribute
working documents as Internet-Drafts. working documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six Internet-Drafts are draft documents valid for a maximum of six
months and may be updated, replaced, or obsoleted by other months and may be updated, replaced, or obsoleted by other
documents at any time. It is inappropriate to use Internet-Drafts documents at any time. It is inappropriate to use Internet-Drafts
as reference material or to cite them other than as "work in as reference material or to cite them other than as "work in
progress." progress."
To view the entire list of current Internet-Drafts, please check To view the entire list of current Internet-Drafts, please check
the "1id-abstracts.txt" listing contained in the Internet-Drafts the "1id-abstracts.txt" listing contained in the Internet-Drafts
Shadow Directories on ftp.is.co.za (Africa), ftp.nordu.net Shadow Directories on ftp.is.co.za (Africa), ftp.nordu.net
(Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East (Northern Europe), ftp.nis.garr.it (Southern Europe), munnari.oz.au
Coast), or ftp.isi.edu (US West Coast). (Pacific Rim), ftp.ietf.org (US East Coast), or ftp.isi.edu (US
West Coast).
Abstract Abstract
With the definition of standardized media types in MIME [MIME-IMT] With the definition of standardized media types in MIME [MIME-IMT]
it has become necessary to keep mapping tables which translate it has become necessary to keep mapping tables which translate
between the standard media type names, commonly used file name between the standard media type names, commonly used file name
extensions, any platform specific typing mechanism, and helper extensions, any platform specific typing mechanism, and helper
applications to view, compose, edit or print media types. applications to view, compose, edit or print media types.
Supplying a set of site defaults is useful so that users won't have Supplying a set of site defaults is useful so that users won't have
to configure well-known types. The mailcap mechanism [MAILCAP] to configure well-known types. The mailcap mechanism [MAILCAP]
provides some of this functionality in a homogenous environment provides some of this functionality in a homogeneous environment
with a shared filesystem, and the Macintosh program "Internet with a shared file system, and both the Macintosh program "Internet
Config" has had success in consolidating these tables for multiple Config" and the Windows Registry have had some success in
applications on a single machine. But neither of these addresses consolidating these tables for multiple applications on a single
the problems of multi-platform users or a heterogenous environment. machine. But neither of these addresses the problems of multi-
platform users or a heterogeneous environment.
ACAP provides precisely the right facilities for this need. ACAP's ACAP provides precisely the right facilities for this need. ACAP's
dataset structure is extensible, and ACAP's inheritance feature is dataset structure is extensible and ACAP's inheritance feature is
ideal for enterprise default settings with per-user customization. ideal for enterprise default settings with per-user customization.
Table of Contents Table of Contents
Status of this memo ............................................... i Status of this memo ............................................... i
Abstract .......................................................... i Abstract .......................................................... i
0. Open Issues .................................................. 1 1. Conventions used in this document .......................... 1
1. Conventions used in this document ............................ 1 2. ACAP Media Type Dataset Class .............................. 1
2. ACAP Media Type Dataset Class ................................ 1 2.1. ACAP Media Type Dataset Class Prefix ....................... 1
2.1. ACAP Media Type Dataset Class Prefix ......................... 1 2.2. ACAP Media Type Dataset Hierarchy .......................... 1
2.3. ACAP Media Type Dataset Hierarchy ............................ 1 3. Recommended ACAP Media Type Attributes ..................... 1
3. Recommended ACAP Media Type Attributes ....................... 1 3.1. Basic Attributes ........................................... 1
3.1. Basic Attributes ............................................. 1 3.2. System independent attributes .............................. 2
3.2. System independent attributes ................................ 2 3.3. MacOS related attributes ................................... 4
3.3. MacOS related attributes ..................................... 4 3.4. Unix Related Attributes .................................... 7
3.4. Unix Related Attributes ...................................... 5 3.5. Windows 95/NT Related Attributes ........................... 9
3.5. Windows 95/NT Related Attributes ............................. 7 3.5.1. Mapping MediaTypes to Windows Registry ..................... 12
3.5. Windows 3.1 Related Attributes ............................... 7 3.6. Windows 3.1 Related Attributes ............................. 13
5. Examples ..................................................... 8 4. Usage Procedures ........................................... 13
6. Security Considerations ...................................... 8 5. Example .................................................... 14
7. References ................................................... 8 6. Security Considerations .................................... 14
8. Author's Address ............................................. 9 7. IANA Considerations ........................................ 15
Appendix .......................................................... 10 8. References ................................................. 15
A. Attribute Index .............................................. 10 9. Author's Address ........................................... 16
Appendix .......................................................... 17
0. Open Issues A. Attribute Index .............................................. 17
1) Can someone else do the Windows sections? I'm not familiar with
the platforms.
1. Conventions used in this document
The key words "REQUIRED", "MUST", "MUST NOT", "SHOULD", "SHOULD The key words "REQUIRED", "MUST", "MUST NOT", "SHOULD", "SHOULD
NOT", "OPTIONAL", and "MAY" in this document are to be interpreted NOT", "OPTIONAL", and "MAY" in this document are to be interpreted
as described in "Key words for use in RFCs to Indicate Requirement as described in "Key words for use in RFCs to Indicate Requirement
Levels" [KEYWORDS]. Levels" [KEYWORDS].
The attribute syntax specifications use the Augmented Backus-Naur The attribute syntax specifications use the Augmented Backus-Naur
Form (ABNF) notation as specified in [IMAIL]. Form [ABNF].
2. ACAP Media Type Dataset Class 2. ACAP Media Type Dataset Class
2.1. ACAP Media Type Dataset Class Prefix 2.1. ACAP Media Type Dataset Class Prefix
Datasets whose names begin with "/mediatype" are assumed to contain Datasets whose names begin with "/mediatype" are assumed to contain
mediatype entries as defined in this specification. mediatype entries as defined in this specification.
2.3. ACAP Media Type Dataset Hierarchy 2.2. ACAP Media Type Dataset Hierarchy
Each user may have a set of named media type profiles for use on Each user may have a set of named media type profiles for use on
different hosts. The default is "default" and is referenced with different hosts. The default is "default" and is referenced with
the path "/mediatype/user/<username>/default/". Inheritance is the path "/mediatype/user/<username>/default/". Inheritance is
likely to be useful both for inheriting site or group defaults as likely to be useful both for inheriting site or group defaults as
well as for inheriting the default configuration when using well as for inheriting the default configuration when using
different hosts. different hosts.
3. Recommended ACAP Media Type Attributes 3. Recommended ACAP Media Type Attributes
A mediatype entry MUST have an "entry" attribute. All other A mediatype entry MUST have an "entry" attribute. All other
attributes are OPTIONAL. attributes are OPTIONAL.
The ABNF defines the content of the attribute values prior to their The ABNF defines the content of the attribute values prior to their
encoding as an ACAP string. Clients MUST conform to the syntax encoding as an ACAP string. Clients MUST conform to the syntax
when generating these attributes, but MUST NOT assume that the when generating these attributes, but MUST NOT assume that the
attribute values will conform to this syntax on access. Servers attribute values will conform to this syntax on access. Servers
MUST NOT enforce the syntax. SHOULD NOT enforce the syntax.
The OS-specific entries define a number of basic actions which may
be performed on a media type. The intention is that additional
actions may be added in the future following the same template as
the existing actions.
3.1. Basic Attributes 3.1. Basic Attributes
These attributes are defined in ACAP [ACAP] and have meaning in all These attributes are defined in ACAP [ACAP] and have meaning in all
dataset classes. The section describes how they are used in an dataset classes. The section describes how they are used in a
mediatype dataset. mediatype dataset.
entry entry
The "entry" attribute is used to hold a descriptive name of The "entry" attribute is used to hold a descriptive name of
the media type. This name is used for inheritance, so when the media type. This name is used for inheritance, so when
customizing a media type which has an entry in an inherited customizing a media type which has an entry in an inherited
dataset, the entry name needs to remain the same. dataset, the entry name needs to remain the same.
subdataset subdataset
The "subdataset" attribute indicates there is another media The "subdataset" attribute indicates there is another media
type dataset underneath this entry. type dataset underneath this entry.
3.2. System independent attributes 3.2. System independent attributes
These attributes are likely to have meaning for all ACAP clients. These attributes are likely to have meaning for all ACAP clients.
mediatype.common.type mediatype.common.type
This is a multi-valued attribute which contains the MIME media This contains the MIME media type [MIME-IMT] of the entry.
type(s) [MIME-IMT] of the entry. It may include type New MIME media types are registered according to the MIME
parameters (such parameters should be canonicalized by registration procedures [MIME-REG].
removing unnecessary quoting and converting to lower case to
simplify lookups). New MIME media types are registered
according to the MIME registration procedures [MIME-REG].
The terminals type, subtype and parameter are defined in MIME The ABNF terminals type and subtype are defined in MIME
Internet Message Bodies [MIME-IMB]. Free insertion of Internet Message Bodies [MIME-IMB]. Free insertion of
linear-white-space is not permitted in this grammar. linear-white-space is not permitted in this grammar.
A subtype of "*" indicates a catch-all entry for a type. A subtype of "*" indicates a catch-all entry for a type.
Clients SHOULD check for a catch-all entry after checking for Clients SHOULD check for a catch-all entry after checking for
a regular entry. a regular entry. Catch-all entries are used only for locating
a helper application, so the extension attributes SHOULD be
NIL.
mtype-typenam = type "/" mtype-subtype *(";" SPACE parameter) mtype-typenam = type "/" mtype-subtype
mtype-subtype = subtype / "*" mtype-subtype = subtype / "*"
mediatype.common.param.<MIME-attribute>
This contains a MIME parameter for the entry. For example,
there might be multiple entries for text media types with
different charset parameters. The <MIME-attribute> portion of
the attribute name matches the ABNF for the "attribute" rule
in [MIME-IMB] but MUST be all lower case. MIME parameter
value encodings [MIME-PVCSC] SHOULD be removed prior to use of
these attributes.
mtype-param = *UTF8-CHAR
mediatype.common.extension mediatype.common.extension
This is a multi-valued attribute which contains the file name This contains the primary file name extension used with this
extension(s) that are commonly associated with this media media type. Extensions should be converted to lower case to
type. For example, with JPEG files (image/jpeg), a number of
extensions have been observed: "jpg", "jpeg", "jfif", "jpe",
and "jfi". Extensions should be converted to lower case to
simplify searching. simplify searching.
mtype-ext = 1*ATOM-CHAR mtype-ext = 1*ATOM-CHAR
mediatype.common.extensionOther
This is a multi-valued attribute which contains additional
file name extension(s) that are commonly associated with this
media type. For example, with JPEG files (image/jpeg), a
number of extensions have been observed: "jpg", "jpeg",
"jfif", "jpe" and "jfi". Extensions should be converted to
lower case to simplify searching.
mediatype.common.magicNumber.bin mediatype.common.magicNumber.bin
This contains the magic number(s) of the media type. A magic This contains the magic number(s) of the media type. A magic
number is a set of octets at the beginning of the file which number is a set of octets at the beginning of the file which
are always the same for that media type. For example, all are always the same for that media type. For example, all
image/gif objects begin with the four-octet sequence (71, 73, image/gif objects begin with the four-octet sequence (71, 73,
70, 56 or "GIF8"). As this is a binary field, it may contain 70, 56 or "GIF8"). As this is a binary field, it may contain
any octet value including 0. This can be used to attempt to any octet value including 0. This can be used to attempt to
locate a type for an untyped file. locate a type for an untyped file.
mtype-magic = 1*OCTET mtype-magic = 1*OCTET
skipping to change at page 3, line 26 skipping to change at page 3, line 41
If this is "1" it indicates that the media type is line If this is "1" it indicates that the media type is line
oriented and subject to newline canonicalization. If this is oriented and subject to newline canonicalization. If this is
"0" it indicates newlines should be preserved. If NIL, the "0" it indicates newlines should be preserved. If NIL, the
client should default this to "0" for non-text types and "1" client should default this to "0" for non-text types and "1"
for text types. for text types.
mtype-text = "0" / "1" mtype-text = "0" / "1"
mediatype.common.description mediatype.common.description
This is a longer textual description of the mediatype. This is a longer textual description of the mediatype.
Newlines are represented by a CRLF sequence.
mtype-desc = *UTF8-CHAR mtype-desc = *UTF8-CHAR
mediatype.common.suppressWarning
If this is "1" then no security warnings will be issued to the
user on any platform. Values other than "1" SHOULD be treated
as equivalent to NIL.
mediatype.common.securityRisk mtype-suppress = "0" / "1"
This contains a token indicating an estimate of the security
risks of the media type. This is likely to be set by a site
administrator. Applications SHOULD consult the security risk
field before taking action on an attachment and SHOULD NOT
launch applications other than "probably-safe" ones without
querying the user.
The levels are "probably-safe", meaning there aren't any known mediatype.common.preferred
or suspected problems and the media type is not extensible. If this is "1" it indicates that this is the preferred entry
audio/basic falls in this category. "probably-safe-but- for a media type with multiple entries. If this is "0", it
extensible" meaning there aren't any known or suspected indicates this is not the preferred entry. NIL indicates an
problems but the media type is extensible and an extension may unspecified preference. For example, the "text/plain" media
result in security problems. image/jpeg falls into this type may be used to represent multiple file types including
category. "caution" means the media type can cause damage in plain text and C source files. Thus there can be multiple
limited circumstances. text/plain falls in this category text/plain entries in the mediatypes list and this attribute
since if they are displayed on a powerful terminal embedded is used to identify which one to use by preference when a
escape sequences could reprogram the keyboard or otherwise single choice must be made.
generate dangerous simulated user input. "caution-extensible"
means the media type is at the caution level, but could be
extended to add further damage. text/enriched falls into this
category. "danger" indicates the type has dangerous functions
which can be used to destroy data and must be executed in a
safe environment or the sender must be trusted.
application/postscript falls into this category due to it's
file operators. text/html falls into this category due to the
numerous security problems it continues to have from
proprietary extensions. Finally, "embedded" means the type is
an encapsulating type which inherits risks from the type
embedded within it. application/applefile falls into this
category.
When this is NIL, clients SHOULD assume "unknown". mtype-preferred = "0" / "1"
mtype-risk = "probably-safe" / "probably-safe-but-extensible" / mediatype.common.MIME
"caution" / "caution-but-extensible" / "danger" / If this is a "1" it indicates the type is represented as a
"embedded" / "unknown" MIME entity (including headers) rather than as a MIME body.
If this is "0", it indicates the type is represented only as a
MIME body. If this is NIL, the client should treat it as "0"
for non-multipart types and "1" for multipart types. Action-
specific ".MIME" attributes take precedence over this when
they are non-NIL.
mtype-mime = "0" / "1"
3.3. MacOS related attributes 3.3. MacOS related attributes
These are attributes which apply to MacOS systems. These are attributes which apply to MacOS systems.
mediatype.macOS.type.bin mediatype.macOS.type.bin
This contains the 4-octet MacOS type code for this media type. This contains the 4-octet MacOS type code for this media type.
mtype-mactype = 4OCTET mtype-mactype = 4OCTET
mediatype.macOS.creator.bin mediatype.macOS.creator.bin
This contains the 4-octet MacOS creator code which the user This contains the 4-octet MacOS creator code which the user
prefers for use with documents of this type. prefers for use with documents of this type.
mtype-maccreat = 4OCTET mtype-maccreat = 4OCTET
mediatype.macOS.postProcess.bin mediatype.macOS.creator.name
This contains the filename of the application whose creator
code is stored in mediatype.macOS.creator.bin. This value
MUST be UTF-8 and not in a MacOS internal character set.
mtype-maccname = 1*UTF8-CHAR
mediatype.macOS.creator.suppressWarning
If this is "1", it indicates a preference to suppress any
security warnings for this media type when launching the
application referenced by the creator code. Values other than
"1" SHOULD be treated as equivalent to NIL.
mtype-maccsuppress = "0" / "1"
mediatype.macOS.action.postProcess.bin
This contains the 4-octet MacOS creator code of an application This contains the 4-octet MacOS creator code of an application
which the user wishes to use when post-processing documents of which the user wishes to use when post-processing documents of
this type. If NIL, then no post-processing is required. This this type. If NIL, then no post-processing is required. This
is primarily used for encapsulating formats such as is primarily used for encapsulating formats such as
application/applefile. application/applefile.
mtype-macpost = 4OCTET mtype-macpost = 4OCTET
mediatype.macOS.creatorName
mediatype.macOS.action.postProcess.name
This contains the filename of the application whose creator This contains the filename of the application whose creator
code is stored in mediatype.MacOS.creator.bin. This value code is stored in mediatype.macOS.postProcess.bin. This value
MUST be UTF-8 and not in a MacOS internal character set. MUST be UTF-8 and not in a MacOS internal character set.
mtype-maccname = 1*UTF8-CHAR mtype-macpname = 1*UTF8-CHAR
mediatype.macOS.postProcessName mediatype.macOS.action.postProcess.MIME
If this is "1", it indicates that the postprocessor takes a
MIME entity (with MIME headers) as input, rather than just a
body part.
mtype-macmime = "0" / "1"
mediatype.macOS.action.edit.bin
This contains the 4-octet MacOS creator code of an application
which the user wishes to use when editing documents of this
type. If NIL, then the application referenced by the creator
code is used.
mtype-macpost = 4OCTET
mediatype.macOS.action.edit.name
This contains the filename of the application whose creator This contains the filename of the application whose creator
code is stored in mediatype.MacOS.postProcess.bin. This value code is stored in mediatype.macOS.edit.bin. This value MUST
MUST be UTF-8 and not in a MacOS internal character set. be UTF-8 and not in a MacOS internal character set.
mtype-macpname = 1*UTF8-CHAR mtype-macpname = 1*UTF8-CHAR
mediatype.macOS.action.edit.MIME
If this is "1", it indicates that the editor takes a MIME
entity (with MIME headers) as input, rather than just a body
part.
mtype-macemime = "0" / "1"
mediatype.macOS.action.edit.suppressWarning
If this is "1", it indicates a preference to suppress any
security warnings for this media type when launching the
application referenced by the mediatype.macOS.action.edit
attribute. Values other than "1" SHOULD be treated as
equivalent to NIL.
mtype-maccsuppress = "0" / "1"
mediatype.macOS.alwaysUseHelper mediatype.macOS.alwaysUseHelper
If this is non-NIL, it states a user preference to use the If this is "1", it states a user preference to use the
specified helper application rather than any internal viewer specified helper application rather than any internal viewer
contained in the dispatching application. contained in the dispatching application.
mtype-macalways = "1" mtype-macalways = "0" / "1"
mediatype.macOS.stripResource
If this is "1", it indicates a preference to strip the
resource fork from this media type prior to transmission.
mtype-macstripres = "0" / "1"
3.4. Unix Related Attributes 3.4. Unix Related Attributes
These attributes are used to launch unix helper applications These attributes are used to launch Unix helper applications
similar to the mailcap [MAILCAP] mechanism. similar to the mailcap [MAILCAP] mechanism.
When a client executes a Unix command line helpers it runs under When a client executes a Unix command line helper it runs under the
the Bourne shell (usually by using the system() function call). Bourne shell (usually by using the system() function call). Prior
Prior to execution, the client SHOULD perform the following to execution, the client SHOULD perform the following substitutions
substitutions into the command line: the string "%s" is replaced by into the command line: the string "%s" is replaced by a temporary
a temporary file name for the body part or MIME part (if %s is file name for the body part or MIME part (if %s is absent, the body
absent, the body part or MIME part is passed through standard part or MIME part is passed through standard input). The string
input). The string "%t" is replaced by the media type and subtype, "%t" is replaced by the media type and subtype, the string
the string "%{<param>}" is replaced by the media type parameter "%{<param>}" is replaced by the media type parameter with name
with name <param>. The character "%" is quoted with "\%". By <param>. The character "%" is quoted with "\%". By default,
default, multi-part types are left intact with MIME headers prior multi-part types are left intact with MIME headers prior to
to dispatching. A dispatching application MAY support the %n and dispatching. A dispatching application MAY support the %n and %F
%F options of mailcap [MAILCAP] for backwards compatibility. options of mailcap [MAILCAP] for backwards compatibility.
mediatype.unix.viewer mediatype.unix.action.view
This contains a command to execute a viewer for the media This contains a command to execute a viewer for the media
type. type.
mtype-unixview = *UTF8-CHAR mtype-unixview = *UTF8-CHAR
mediatype.unix.viewerMIME
mediatype.unix.action.view.MIME
If this is non-NIL it indicates that the viewer uses MIME If this is non-NIL it indicates that the viewer uses MIME
entities (with complete headers) rather than body parts. entities (with complete headers) rather than body parts.
mtype-unixvmime = "1" mtype-unixvmime = "0" / "1"
mediatype.unix.composer mediatype.unix.action.view.suppressWarning
If this is "1", it indicates a preference to suppress any
security warnings for this media type when launching the
viewer. Values other than "1" SHOULD be treated as equivalent
to NIL.
mtype-unixvsuppress = "0" / "1"
mediatype.unix.action.view.output
This indicates any output assistance which the viewer command
needs. The "terminal" option indicates an interactive
terminal is needed and the dispatcher should create a terminal
window or the equivalent. The "pager" option indicates the
output may be more than 24 lines and the viewer does not have
a built-in pager.
mtype-unixout = "terminal" / "pager"
mediatype.unix.action.compose
This contains a command to execute a program to compose a new This contains a command to execute a program to compose a new
body part of the specified media type. If not set, it is body part of the specified media type. If not set, it is
assumed to be the same as mediatype.unix.editor. assumed to be the same as mediatype.unix.editor.
mtype-unixcomp = *UTF8-CHAR mtype-unixcomp = *UTF8-CHAR
mediatype.unix.composerMIME mediatype.unix.action.compose.MIME
If this is non-NIL it indicates that the composer uses MIME If this is non-NIL it indicates that the composer uses MIME
entities (with complete headers) rather than body parts. entities (with complete headers) rather than body parts.
mtype-unixcmime = "1" mtype-unixcmime = "0" / "1"
mediatype.unix.editor mediatype.unix.action.edit
This contains a command to execute a program to edit body This contains a command to execute a program to edit body
parts of the specified media type. If not set, it is assumed parts of the specified media type. If not set, it is assumed
to be the same as mediatype.unix.viewer. to be the same as mediatype.unix.view.
mtype-unixedit = *UTF8-CHAR mtype-unixedit = *UTF8-CHAR
mediatype.unix.editorMIME mediatype.unix.action.edit.MIME
If this is non-NIL it indicates that the editor uses MIME If this is non-NIL it indicates that the editor uses MIME
entities (with complete headers) rather than body parts. entities (with complete headers) rather than body parts.
mtype-unixemime = "1" mtype-unixemime = "0" / "1"
mediatype.unix.print mediatype.unix.action.edit.suppressWarning
If this is "1", it indicates a preference to suppress any
security warnings for this media type when launching the
viewer. Values other than "1" SHOULD be treated as equivalent
to NIL.
mtype-unixesuppress = "0" / "1"
mediatype.unix.action.print
This contains a command to print a body part of the specified This contains a command to print a body part of the specified
type. type.
mtype-unixprint = *UTF8-CHAR mtype-unixprint = *UTF8-CHAR
mediatype.unix.printMIME mediatype.unix.action.print.MIME
If this is non-NIL it indicates that the print command uses If this is non-NIL it indicates that the print command uses
MIME entities (with complete headers) rather than body parts. MIME entities (with complete headers) rather than body parts.
mtype-unixpmime = "1" mtype-unixpmime = "0" / "1"
mediatype.unix.output mediatype.unix.action.print.suppressWarning
This indicates any output assistance which the viewer command If this is "1", it indicates a preference to suppress any
needs. The "terminal" option indicates an interactive security warnings for this media type when launching the
terminal is needed and the dispatcher should create a terminal viewer. Values other than "1" SHOULD be treated as equivalent
window or the equivalent. The "pager" option indicates the to NIL.
output may be more than 24 lines and the viewer does not have
a built-in pager.
mtype-unixout = "terminal" / "pager" mtype-unixpsuppress = "0" / "1"
mediatype.unix.alwaysUseHelper mediatype.unix.alwaysUseHelper
If this is non-NIL, it states a user preference to use the If this is non-NIL, it states a user preference to use the
specified helper application rather than any internal viewer specified helper application rather than any internal viewer
contained in the dispatching application. contained in the dispatching application.
mtype-unixalways = "1" mtype-unixalways = "0" / "1"
3.5. Windows 95/NT Related Attributes 3.5. Windows 95/NT Related Attributes
mediatype.win32.viewer These attributes are used to launch windows helper applications.
mediatype.win32.editor Prior to execution, the client MUST perform the following
substitutions into the command line:
The strings "%r" and "%p" are replaced by Windows System Directory
and Program Files Directory respectively. (The Program Files
Directory name can be obtained from registry, key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion,
attribute: "ProgramFilesDir".)
The string "%s" is replaced by a temporary file name for the body
part or MIME part (if %s is absent, the body part or MIME part is
passed through standard input).
The string "%t" is replaced by the media type and subtype, the
string "%{<param>}" is replaced by the media type parameter with
name <param>. The character "%" is quoted with "\%". By default,
multi-part types are left intact with MIME headers prior to
dispatching.
In order to simplify configuration of different PCs it is
encouraged to use %r and %p instead of full directories names,
because different PCs can contain Windows System Directory on
different drives.
For example it is better to use "%r\system32\notepad.exe" instead
of "E:\WinNT\system32\notepad.exe", where %r is equal to "E:\WinNT"
on a specific PC.
mediatype.win32.action.view
This contains a command to execute a viewer for the media
type.
mtype-win32view = *UTF8-CHAR
mediatype.win32.action.view.suppressWarning
If this is "1", it indicates a preference to suppress any
security warnings for this media type when launching the
viewer. Values other than "1" SHOULD be treated as equivalent
to NIL.
mtype-win32vsuppress = "0" / "1"
mediatype.win32.action.view.MIME
If this is "1" then it indicates that the viewer uses MIME
entities (with complete headers) rather than body parts.
mtype-win32vmime = "0" / "1"
mediatype.win32.action.compose
This contains a command to execute a program to compose a new
body part of the specified media type. If not set, it is
assumed to be the same as mediatype.win32.action.edit.
mtype-win32comp = *UTF8-CHAR
mediatype.win32.action.compose.MIME
This contains a command to execute a program to compose a new
body part of the specified media type. If not set, it is
assumed to be the same as mediatype.win32.editor.
mtype-win32cmime = "0" / "1"
mediatype.win32.action.edit
This contains a command to execute a program to edit body
parts of the specified media type. If not set, it is assumed
to be the same as mediatype.win32.action.view.
mtype-win32edit = *UTF8-CHAR
mediatype.win32.action.edit.suppressWarning
If this is "1", it indicates a preference to suppress any
security warnings for this media type when editing the media
type. Values other than "1" SHOULD be treated as equivalent
to NIL.
mtype-win32editSup = "0" / "1"
mediatype.win32.action.edit.MIME
If this is "1" then the data will be sent as a MIME entity
(including the MIME headers) rather than as just the body
part.
mtype-win32editMIME = "0" / "1"
mediatype.win32.action.print
This contains a command to print a body part of the specified
media type.
mtype-win32print = *UTF8-CHAR
mediatype.win32.action.print.suppressWarning
If this is "1", it indicates a preference to suppress any
security warnings for this media type when printing the media
type. Values other than "1" SHOULD be treated as equivalent
to NIL.
mtype-win32printSup = "0" / "1"
mediatype.win32.action.print.MIME
If this is "1" then the data will be sent as a MIME entity
(including the MIME headers) rather than as just the body
part.
mtype-win32printMIME = "0" / "1"
mediatype.win32.alwaysUseHelper mediatype.win32.alwaysUseHelper
If this is non-NIL, it states a user preference to use the
specified helper application rather than any internal viewer
contained in the dispatching application.
3.5. Windows 3.1 Related Attributes mtype-win32always = "0" / "1"
These attributes are specific to Windows 3.1 machines. If these mediatype.win32.icon
are not present, then the mediatype.win32.* attributes may be used If this is non-NIL, it contains a path and index to an icon
instead. representing the media type. An ACAP client MAY use local
information in preference to this attribute.
mediatype.win31.viewer non-comma-char = %x01-09 / %x0B-0C / %x0E-2B / %x2D-7F /
UTF8-2 / UTF8-3 / UTF8-4 / UTF8-5 / UTF8-6
mtype-win32icon = *non-comma-char "," number
; file name and zero based index of icon in this file
mediatype.win31.editor 3.5.1. Mapping MediaTypes to Windows Registry
mediatype.win31.alwaysUseHelper
5. Examples Many of the attributes in this dataset class correspond closely to
attributes in the Windows registry. The following list descributes
how this mapping aligns.
TODO entry:
Key HKEY_CLASSES_ROOT\<extension>
Attribute ""
mediatype.common.type:
Key HKEY_CLASSES_ROOT\<extension>
Attribute "Content Type"
mediatype.common.description
Key HKEY_CLASSES_ROOT\<mtype>
Attribute ""
mediatype.win32.action.view:
Key HKEY_CLASSES_ROOT\<mtype>\shell\open\command
Attribute ""
mediatype.win32.action.compose:
Key HKEY_CLASSES_ROOT\<mtype>\shell\new\command
Attribute ""
mediatype.win32.action.edit:
Key HKEY_CLASSES_ROOT\<mtype>\shell\edit\command
Attribute ""
mediatype.win32.action.print:
Key HKEY_CLASSES_ROOT\<mtype>\shell\print\command
Attribute ""
mediatype.win32.icon:
Key HKEY_CLASSES_ROOT\<mtype>\DefaultIcon
Attribute ""
Where <extension> is a file extension (with leading dot), and <mtype>
is the value of HKEY_CLASSES_ROOT\<extension> Attribute "".
3.6. Windows 3.1 Related Attributes
Windows 3.1 attributes are identical to the win32 attributes,
except the attribute names contain "win31" instead of "win32".
4. Usage Procedures
In order to locate the entry to use with a MIME entity, the
following procedure is taken; stopping whenever a single entry
remains in the list after a step.
(A) If the media type is application/octet-stream and there is a
filename with extension present, search for entries with a matching
extension or extensionOther field and skip to step (E).
(B) Search for entries with a mediatype.common.type of
"<type>/<subtype>". Exclude any entries where the parameter on the
media type doesn't match the parameters in mediatype.common.param.*
attributes. For example, a "text/plain; charset=iso-2022-jp" media
type does not match an entry with a
"mediatype.common.param.charset" value of "utf-8".
(C) If no matching entries result, look for a mediatype.common.type
of "<type>/*" and repeat (A).
(D) If there is a filename with extension present, use the
extension to reduce the number of matches.
(E) Exclude all entries with a mediatype.common.preferred value of
"0".
(F) If any entry has a mediatype.common.preferred attribute of "1"
exclude all entries which have a NIL mediatype.common.preferred
attribute.
(G) If multiple matching entries remain, pick one at random or
prompt the user.
When launching the appropriate helper application, a security
warning SHOULD be issued if the MIME entity arrived from an
external source and the appropriate suppressWarning attribute is
not "1". A security warning MAY be issued under any circumstances.
5. Example
Here is an example mediatype entry. Multi-valued attributes are
represented with parenthesis around the multiple values.
attribute value
--------- -----
entry JPEG image
mediatype.common.type image/jpeg
mediatype.common.extension jpg
mediatype.common.extensionOther (jpeg jpe jfif jfi)
mediatype.common.description JPEG is an image format most
suitable for compressing
photographs
mediatype.common.suppressWarning 1
mediatype.macOS.type.bin JPEG
mediatype.macOS.creator.bin JVWR
mediatype.macOS.creator.name JPEG View
mediatype.macOS.action.edit.bin 8BIM
mediatype.macOS.action.edit.name Adobe Photoshop
mediatype.unix.action.view xv
Here is an example use of ACAP to fetch information about a media
type by name:
C: A047 SEARCH "/mediatype/~/default/" RETURN ("*")
EQUAL "entry" "i;octet" "WinZip File"
S: A047 ENTRY "WinZip File" (("modtime" "19980309102226")
("mediatype.common.extension" ("zip"))
("mediatype.common.type" ("application/x-zip-compressed"))
("mediatype.common.description" ("Zip arhive file")
("mediatype.common.textualNewlines" "0")
("mediatype.win32.action.view" "%r\WinZip\winzip32.exe")
("mediatype.win32.icon" "%r\WinZip\winzip32.exe,0")
("mediatype.win32.alwaysUseHelper" "1"))
S: A047 MODTIME "19980309105258"
S: A047 OK "SEARCH completed"
6. Security Considerations 6. Security Considerations
Security considerations for launching helper applications for media This dataset provides the ability to identify a helper application
types are discussed in the section for the to process a media type. Such helper applications may be subject
mediatype.common.securityRisk attribute. to serious security considerations as discussed in MIME [MIME-IMT].
It is expected that programs which launch helper applications will
display a security warning to the user unless the media type is
known to be safe or the appropriate suppressWarning attribute is
set.
7. References The suppressWarning attributes should not be set without serious
consideration of the potential security issues of automatically
dispatching the media type to a helper application.
[BASIC-URL] Berners-Lee, Masinter, McCahill, "Uniform Resource 7. IANA Considerations
Locators (URL)", RFC 1738, CERN, Xerox Coproration, University of
Minnesota, December 1994.
<ftp://ds.internic.net/rfc/rfc1738.txt> This document constitutes the registration for the "mediatype"
dataset class per section 7.3 of RFC 2244.
[IMAIL] Crocker, D., "Standard for the Format of ARPA Internet Text Dataset class name/attribute prefix: mediatype
Messages", STD 11, RFC 822, University of Delaware, August 1982.
<ftp://ds.internic.net/rfc/rfc822.txt> Purpose: Media Type Mappings
Published Specification(s): This specification
Person and email address to contact for further information:
See section 9.
8. References
[ABNF] Crocker, Overell, "Augmented BNF for Syntax Specifications:
ABNF", RFC 2234, Internet Mail Consortium, Demon Internet Ltd,
November 1997.
[ACAP] Newman, C., Myers, J., "ACAP -- Application Configuration
Access Protocol", RFC 2244, Innosoft, Netscape, November 1997.
[IMAP4] Crispin, M., "Internet Message Access Protocol - Version [IMAP4] Crispin, M., "Internet Message Access Protocol - Version
4rev1", RFC 2060, University of Washington, December 1996. 4rev1", RFC 2060, University of Washington, December 1996.
<ftp://ds.internic.net/rfc/rfc2060.txt>
[KEYWORDS] Bradner, "Key words for use in RFCs to Indicate [KEYWORDS] Bradner, "Key words for use in RFCs to Indicate
Requirement Levels", RFC 2119, Harvard University, March 1997. Requirement Levels", RFC 2119, Harvard University, March 1997.
<ftp://ds.internic.net/rfc/rfc2119.txt>
[MAILCAP] Borenstein, "A User Agent Configuration Mechanism For [MAILCAP] Borenstein, "A User Agent Configuration Mechanism For
Multimedia Mail Format Information", RFC 1524, Bellcore, September Multimedia Mail Format Information", RFC 1524, Bellcore, September
1993. 1993.
<ftp://ds.internic.net/rfc/rfc1524.txt>
[MIME-IMB] Freed, Borenstein, "Multipurpose Internet Mail [MIME-IMB] Freed, Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message Bodies", RFC Extensions (MIME) Part One: Format of Internet Message Bodies", RFC
2045, Innosoft, First Virtual, November 1996. 2045, Innosoft, First Virtual, November 1996.
<ftp://ds.internic.net/rfc/rfc2045.txt>
[MIME-IMT] Freed, Borenstein, "Multipurpose Internet Mail [MIME-IMT] Freed, Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types", RFC 2046, Innosoft, First Extensions (MIME) Part Two: Media Types", RFC 2046, Innosoft, First
Virtual, November 1996. Virtual, November 1996.
<ftp://ds.internic.net/rfc/rfc2046.txt> [MIME-PVCSC] Freed, N., Moore, K., "MIME Parameter Value and
Encoded Words: Character Sets, Language, and Continuations", RFC
2234, Innosoft, University of Tennessee, November 1997.
[MIME-REG] Freed, Klensin, Postel, "Multipurpose Internet Mail [MIME-REG] Freed, Klensin, Postel, "Multipurpose Internet Mail
Extensions (MIME) Part Four: Registration Procedures", RFC 2048, Extensions (MIME) Part Four: Registration Procedures", RFC 2048,
Innosoft, MCI, ISI, November 1996. Innosoft, MCI, ISI, November 1996.
<ftp://ds.internic.net/rfc/rfc2048.txt> [URI] Berners-Lee, T., Fielding, R., Masinter, L., "Uniform
Resource Identifiers (URI): Generic Syntax", RFC 2396, MIT/LCS,
[REL-URL] Fielding, "Relative Uniform Resource Locators", RFC 1808, August 1998.
UC Irvine, June 1995.
<ftp://ds.internic.net/rfc/rfc1808.txt>
[UTF8] Yergeau, F. "UTF-8, a transformation format of Unicode and
ISO 10646", RFC 2044, Alis Technologies, October 1996.
<ftp://ds.internic.net/rfc/rfc2044.txt> [UTF8] Yergeau, F., "UTF-8, a transformation format of ISO 10646",
RFC 2279, Alis Technologies, January 1998.
8. Author's Address 9. Author's Address
Chris Newman Chris Newman
Innosoft International, Inc. Innosoft International, Inc.
1050 Lakes Drive 1050 Lakes Drive
West Covina, CA 91790 USA West Covina, CA 91790 USA
Email: chris.newman@innosoft.com Email: chris.newman@innosoft.com
Alexey Melnikov
Epsylon Technologies
general Ermolov street, 6 - 90
Moscow, Russia, 121293
Email: mel@taxxi.com
Appendix Appendix
A. Attribute Index A. Attribute Index
entry ...................................................... 2 entry ...................................................... 2
mediatype.common.MIME ...................................... 4
mediatype.common.description ............................... 3 mediatype.common.description ............................... 3
mediatype.common.extension ................................. 2 mediatype.common.extension ................................. 3
mediatype.common.extensionOther ............................ 3
mediatype.common.magicNumber.bin ........................... 3 mediatype.common.magicNumber.bin ........................... 3
mediatype.common.securityRisk .............................. 3 mediatype.common.param.<MIME-attribute> .................... 2
mediatype.common.preferred ................................. 4
mediatype.common.suppressWarning ........................... 4
mediatype.common.textualNewlines ........................... 3 mediatype.common.textualNewlines ........................... 3
mediatype.common.type ...................................... 2 mediatype.common.type ...................................... 2
mediatype.macOS.alwaysUseHelper ............................ 5 mediatype.macOS.action.edit.MIME ........................... 6
mediatype.macOS.action.edit.bin ............................ 6
mediatype.macOS.action.edit.name ........................... 6
mediatype.macOS.action.edit.suppressWarning ................ 6
mediatype.macOS.action.postProcess.MIME .................... 5
mediatype.macOS.action.postProcess.bin ..................... 5
mediatype.macOS.action.postProcess.name .................... 5
mediatype.macOS.alwaysUseHelper ............................ 6
mediatype.macOS.creator.bin ................................ 4 mediatype.macOS.creator.bin ................................ 4
mediatype.macOS.creatorName ................................ 5 mediatype.macOS.creator.name ............................... 5
mediatype.macOS.postProcess.bin ............................ 4 mediatype.macOS.creator.suppressWarning .................... 5
mediatype.macOS.postProcessName ............................ 5 mediatype.macOS.stripResource .............................. 6
mediatype.macOS.type.bin ................................... 4 mediatype.macOS.type.bin ................................... 4
mediatype.unix.alwaysUseHelper ............................. 7 mediatype.unix.action.compose .............................. 8
mediatype.unix.composer .................................... 6 mediatype.unix.action.compose.MIME ......................... 8
mediatype.unix.composerMIME ................................ 6 mediatype.unix.action.edit ................................. 8
mediatype.unix.editor ...................................... 6 mediatype.unix.action.edit.MIME ............................ 8
mediatype.unix.editorMIME .................................. 6 mediatype.unix.action.edit.suppressWarning ................. 8
mediatype.unix.output ...................................... 7 mediatype.unix.action.print ................................ 8
mediatype.unix.print ....................................... 6 mediatype.unix.action.print.MIME ........................... 9
mediatype.unix.printMIME ................................... 6 mediatype.unix.action.print.suppressWarning ................ 9
mediatype.unix.viewer ...................................... 5 mediatype.unix.action.view ................................. 7
mediatype.unix.viewerMIME .................................. 6 mediatype.unix.action.view.MIME ............................ 7
mediatype.win31.alwaysUseHelper ............................ 8 mediatype.unix.action.view.output .......................... 7
mediatype.win31.editor ..................................... 7 mediatype.unix.action.view.suppressWarning ................. 7
mediatype.win31.viewer ..................................... 7 mediatype.unix.alwaysUseHelper ............................. 9
mediatype.win32.alwaysUseHelper ............................ 7 mediatype.win32.action.compose ............................. 10
mediatype.win32.editor ..................................... 7 mediatype.win32.action.compose.MIME ........................ 10
mediatype.win32.viewer ..................................... 7 mediatype.win32.action.edit ................................ 11
mediatype.win32.action.edit.MIME ........................... 11
mediatype.win32.action.edit.suppressWarning ................ 11
mediatype.win32.action.print ............................... 11
mediatype.win32.action.print.MIME .......................... 11
mediatype.win32.action.print.suppressWarning ............... 11
mediatype.win32.action.view ................................ 10
mediatype.win32.action.view.MIME ........................... 10
mediatype.win32.action.view.suppressWarning ................ 10
mediatype.win32.alwaysUseHelper ............................ 12
mediatype.win32.icon ....................................... 12
subdataset ................................................. 2 subdataset ................................................. 2
 End of changes. 79 change blocks. 
194 lines changed or deleted 536 lines changed or added

This html diff was produced by rfcdiff 1.34. The latest version is available from http://tools.ietf.org/tools/rfcdiff/