5. Newly defined X.400 Body Parts
This section defines new X.400 Body Parts for the purposes of interworking with MIME. All new X.400 Body Parts defined here will be Extended Body Parts, as defined in CCITT Recommendation X.420 [2].
5.1. Use of OBJECT IDENTIFIERs and ASN.1 MACROS
X.420 dictates that Extended Body Parts shall:
(1) use OBJECT IDENTIFIERs (OIDs) to uniquely identify
the contents, and
(2) be defined by using the ASN.1 Macro:
EXTENDED-BODY-PART-TYPE MACRO::=
BEGIN
TYPE NOTATION ::= Parameters Data
VALUE NOTATION ::= value (VALUE OBJECT IDENTIFIER)
Parameters ::= "PARAMETERS" type "IDENTIFIED"
"BY" value(OBJECT IDENTIFIER)
| empty;
Data ::= "DATA" type
END
To meet these requirements, this document uses the OID
mime-mhs-bodies
defined in [1], as the root OID for X.400 Extended Body Parts defined for MIME interworking. Each Extended Body Part contains Data and optional Parameters, each being named by an OID. To this end, two OID subtrees are defined under mime-mhs-bodies, one for Data, and the other for Parameters:
mime-mhs-bp-data OBJECT IDENTIFIER ::=
{ mime-mhs-bodies 1 }
mime-mhs-bp-parameter OBJECT IDENTIFIER ::=
{ mime-mhs-bodies 2 }
All definitions of X.400 body parts submitted to the IANA for registration must use the Extended Body Part Type macro for the definition. See the next section for an example.
Lastly, the IANA will use the mime-mhs-bp-data and mime-mhs-bp-parameter OIDs as root OIDs for any new MIME content-type/subtypes that aren't otherwise registered in the Equivalence Table.
5.2. The Generic MIME Extended Body Part
The following X.400 Body Part is defined to carry any MIME content-type for which there is no explicit IANA registered mapping.
mime-body-part EXTENDED-BODY-PART-TYPE
PARAMETERS MimeParameters
IDENTIFIED BY mime-generic-parameters
DATA OCTET STRING
::= mime-generic-data
MimeParameters ::=
SEQUENCE {
content-type IA5String,
content-parameters SEQUENCE OF
SEQUENCE {
parameter IA5String,
parameter-value IA5String
}
-- from RFC-1327, sec. 5.1.12
other-header-fields RFC822FieldList
}
mime-generic-parameters OBJECT IDENTIFIER ::=
{ mime-mhs-bp-parameter 1 }
mime-generic-data OBJECT IDENTIFIER ::=
{ mime-mhs-bp-data 1 }
To convert the MIME content-type into the X.400 mime- body-part:
(1) Copy the "type/subtype" string from the MIME
Content-Type: header field into
MimeParameters.content-type
(2) For each "parameter=value" string in the MIME
Content-Type header field, create a
MimeParameters.content-parameters structure, and copy
the "parameter" string into MimeParameters.content-
parameters.parameter field and the "value" string
into the paired MimeParameters.content-
parameters.parameter-value field.
(3) Convert the MIME body part into its canonical form.
(See appendix H of RFC 1341 [3] for a discussion
of canonical in this context.) Said another way,
reverse the transfer encoding to recover the original
byte stream.
(4) Copy the canonical byte stream into the mime-body-
part.data octet string.
(5) Remove the Content-type and the Content-transfer-
encoding header fields from the MIME body part's
RFC822 header.
(6) Any header fields starting with "Content-" in the
MIME body part is placed in the optional other-
header-fields structure. Note that this can only
occur when the MIME content-type occurs as part of a
"multipart" content-type.
The mapping from the X.400 mime-body-part to a MIME content-type is the inverse of the above steps.
5.3. The PostScript body part
The following Extended Body Part is defined for PostScript data streams. It has no parameters.
postscript-body-part EXTENDED-BODY-PART-TYPE
DATA OCTET STRING
::= mime-postscript-body
mime-postscript-body OBJECT IDENTIFIER ::=
{ mime-mhs-bp-data 2 }
5.4. The JPEG body part
The following Extended Body Part is defined for JPEG data streams. It has no parameters.
jpeg-body-part EXTENDED-BODY-PART-TYPE
DATA OCTET STRING
::= mime-jpeg-body
mime-jpeg-body OBJECT IDENTIFIER ::=
{ mime-mhs-bp-data 3 }
5.5. The GIF body part
The following Extended Body Part is defined for GIF data streams. It has no parameters.
gif-body-part EXTENDED-BODY-PART-TYPE
DATA OCTET STRING
::= mime-gif-body
mime-gif-body OBJECT IDENTIFIER ::=
{ mime-mhs-bp-data 4 }