Debian Codegraph @

rfc2387.html

raw
1 <pre>Network Working Group E. Levinson
2 Request for Comments: 2387 August 1998
3 Obsoletes: <a href="./rfc2112">2112</a>
4 Category: Standards Track
5
6
7 <span class="h1">The MIME Multipart/Related Content-type</span>
8
9 Status of this Memo
10
11 This document specifies an Internet standards track protocol for the
12 Internet community, and requests discussion and suggestions for
13 improvements. Please refer to the current edition of the "Internet
14 Official Protocol Standards" (STD 1) for the standardization state
15 and status of this protocol. Distribution of this memo is unlimited.
16
17 Copyright Notice
18
19 Copyright (C) The Internet Society (1998). All Rights Reserved.
20
21 Abstract
22
23 The Multipart/Related content-type provides a common mechanism for
24 representing objects that are aggregates of related MIME body parts.
25 This document defines the Multipart/Related content-type and provides
26 examples of its use.
27
28 <span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
29
30 Several applications of MIME, including MIME-PEM, and MIME-Macintosh
31 and other proposals, require multiple body parts that make sense only
32 in the aggregate. The present approach to these compound objects has
33 been to define specific multipart subtypes for each new object. In
34 keeping with the MIME philosophy of having one mechanism to achieve
35 the same goal for different purposes, this document describes a
36 single mechanism for such aggregate or compound objects.
37
38 The Multipart/Related content-type addresses the MIME representation
39 of compound objects. The object is categorized by a "type"
40 parameter. Additional parameters are provided to indicate a specific
41 starting body part or root and auxiliary information which may be
42 required when unpacking or processing the object.
43
44 Multipart/Related MIME entities may contain Content-Disposition
45 headers that provide suggestions for the storage and display of a
46 body part. Multipart/Related processing takes precedence over
47 Content-Disposition; the interaction between them is discussed in
48 <a href="#section-4">section 4</a>.
49
50
51
52 <span class="grey">Levinson Standards Track [Page 1]</span></pre>
53 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
54 <span class="grey"><a href="./rfc2387">RFC 2387</a> Multipart/Related August 1998</span>
55
56
57 Responsibility for the display or processing of a Multipart/Related's
58 constituent entities rests with the application that handles the
59 compound object.
60
61 <span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Multipart/Related Registration Information</span>
62
63 The following form is copied from <a href="./rfc1590#appendix-A">RFC 1590, Appendix&nbsp;A</a>.
64
65 To: [email protected]
66 Subject: Registration of new Media Type content-type/subtype
67
68 Media Type name: Multipart
69
70 Media subtype name: Related
71
72 Required parameters: Type, a media type/subtype.
73
74 Optional parameters: Start
75 Start-info
76
77 Encoding considerations: Multipart content-types cannot have
78 encodings.
79
80 Security considerations: Depends solely on the referenced type.
81
82 Published specification: RFC-REL (this document).
83
84 Person &amp; email address to contact for further information:
85 Edward Levinson
86 47 Clive Street
87 Metuchen, NJ 08840-1060
88 +1 908 494 1606
89 [email protected]
90
91 <span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. Intended usage</span>
92
93 The Multipart/Related media type is intended for compound objects
94 consisting of several inter-related body parts. For a
95 Multipart/Related object, proper display cannot be achieved by
96 individually displaying the constituent body parts. The content-type
97 of the Multipart/Related object is specified by the type parameter.
98 The "start" parameter, if given, points, via a content-ID, to the
99 body part that contains the object root. The default root is the
100 first body part within the Multipart/Related body.
101
102 The relationships among the body parts of a compound object
103 distinguishes it from other object types. These relationships are
104 often represented by links internal to the object's components that
105
106
107
108 <span class="grey">Levinson Standards Track [Page 2]</span></pre>
109 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
110 <span class="grey"><a href="./rfc2387">RFC 2387</a> Multipart/Related August 1998</span>
111
112
113 reference the other components. Within a single operating
114 environment the links are often file names, such links may be
115 represented within a MIME message using content-IDs or the value of
116 some other "Content-" headers.
117
118 <span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. The Type Parameter</span>
119
120 The type parameter must be specified and its value is the MIME media
121 type of the "root" body part. It permits a MIME user agent to
122 determine the content-type without reference to the enclosed body
123 part. If the value of the type parameter and the root body part's
124 content-type differ then the User Agent's behavior is undefined.
125
126 <span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. The Start Parameter</span>
127
128 The start parameter, if given, is the content-ID of the compound
129 object's "root". If not present the "root" is the first body part in
130 the Multipart/Related entity. The "root" is the element the
131 applications processes first.
132
133 <span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. The Start-Info Parameter</span>
134
135 Additional information can be provided to an application by the
136 start-info parameter. It contains either a string or points, via a
137 content-ID, to another MIME entity in the message. A typical use
138 might be to provide additional command line parameters or a MIME
139 entity giving auxiliary information for processing the compound
140 object.
141
142 Applications that use Multipart/Related must specify the
143 interpretation of start-info. User Agents shall provide the
144 parameter's value to the processing application. Processes can
145 distinguish a start-info reference from a token or quoted-string by
146 examining the first non-white-space character, "&lt;" indicates a
147 reference.
148
149 <span class="h3"><a class="selflink" id="section-3.4" href="#section-3.4">3.4</a>. Syntax</span>
150
151 related-param := [ ";" "start" "=" cid ]
152 [ ";" "start-info" "="
153 ( cid-list / value ) ]
154 [ ";" "type" "=" type "/" subtype ]
155 ; order independent
156
157 cid-list := cid cid-list
158
159 cid := msg-id ; c.f. [<a href="#ref-822" title="&quot;Standard for the Format of ARPA Internet Text Messages&quot;">822</a>]
160
161
162
163
164 <span class="grey">Levinson Standards Track [Page 3]</span></pre>
165 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
166 <span class="grey"><a href="./rfc2387">RFC 2387</a> Multipart/Related August 1998</span>
167
168
169 value := token / quoted-string ; c.f. [<a href="#ref-MIME" title="&quot;Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies&quot;">MIME</a>]
170 ; value cannot begin with "&lt;"
171
172 Note that the parameter values will usually require quoting. Msg-id
173 contains the special characters "&lt;", "&gt;", "@", and perhaps other
174 special characters. If msg-id contains quoted-strings, those quote
175 marks must be escaped. Similarly, the type parameter contains the
176 special character "/".
177
178 <span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Handling Content-Disposition Headers</span>
179
180 Content-Disposition Headers [<a href="#ref-DISP" title="&quot;Communicating Presentation Information in Internet Messages: The Content- Disposition Header&quot;">DISP</a>] suggest presentation styles for
181 MIME body parts. [<a href="#ref-DISP" title="&quot;Communicating Presentation Information in Internet Messages: The Content- Disposition Header&quot;">DISP</a>] describes two presentation styles, called
182 the disposition type, INLINE and ATTACHMENT. These, used within a
183 multipart entity, allow the sender to suggest presentation
184 information. [<a href="#ref-DISP" title="&quot;Communicating Presentation Information in Internet Messages: The Content- Disposition Header&quot;">DISP</a>] also provides for an optional storage (file)
185 name. Content-Disposition headers could appear in one or more body
186 parts contained within a Multipart/Related entity.
187
188 Using Content-Disposition headers in addition to Multipart/Related
189 provides presentation information to User Agents that do not
190 recognize Multipart/Related. They will treat the multipart as
191 Multipart/Mixed and they may find the Content-Disposition information
192 useful.
193
194 With Multipart/Related however, the application processing the
195 compound object determines the presentation style for all the
196 contained parts. In that context the Content-Disposition header
197 information is redundant or even misleading. Hence, User Agents that
198 understand Multipart/Related shall ignore the disposition type within
199 a Multipart/Related body part.
200
201 It may be possible for a User Agent capable of handling both
202 Multipart/Related and Content-Disposition headers to provide the
203 invoked application the Content-Disposition header's optional
204 filename parameter to the Multipart/Related. The use of that
205 information will depend on the specific application and should be
206 specified when describing the handling of the corresponding compound
207 object. Such descriptions would be appropriate in an RFC registering
208 that object's media type.
209
210 <span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Examples</span>
211
212 <span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a> Application/X-FixedRecord</span>
213
214 The X-FixedRecord content-type consists of one or more octet-streams
215 and a list of the lengths of each record. The root, which lists the
216 record lengths of each record within the streams. The record length
217
218
219
220 <span class="grey">Levinson Standards Track [Page 4]</span></pre>
221 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
222 <span class="grey"><a href="./rfc2387">RFC 2387</a> Multipart/Related August 1998</span>
223
224
225 list, type Application/X-FixedRecord, consists of a set of INTEGERs
226 in ASCII format, one per line. Each INTEGER gives the number of
227 octets from the octet-stream body part that constitute the next
228 "record".
229
230 The example below, uses a single data block.
231
232 Content-Type: Multipart/Related; boundary=example-1
233 start="&lt;[email protected]&gt;";
234 type="Application/X-FixedRecord"
235 start-info="-o ps"
236
237 --example-1
238 Content-Type: Application/X-FixedRecord
239 Content-ID: &lt;[email protected]&gt;
240
241 25
242 10
243 34
244 10
245 25
246 21
247 26
248 10
249 --example-1
250 Content-Type: Application/octet-stream
251 Content-Description: The fixed length records
252 Content-Transfer-Encoding: base64
253 Content-ID: &lt;[email protected]&gt;
254
255 T2xkIE1hY0RvbmFsZCBoYWQgYSBmYXJtCkUgSS
256 BFIEkgTwpBbmQgb24gaGlzIGZhcm0gaGUgaGFk
257 IHNvbWUgZHVja3MKRSBJIEUgSSBPCldpdGggYS
258 BxdWFjayBxdWFjayBoZXJlLAphIHF1YWNrIHF1
259 YWNrIHRoZXJlLApldmVyeSB3aGVyZSBhIHF1YW
260 NrIHF1YWNrCkUgSSBFIEkgTwo=
261
262 --example-1--
263
264
265
266
267
268
269
270
271
272
273
274
275
276 <span class="grey">Levinson Standards Track [Page 5]</span></pre>
277 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
278 <span class="grey"><a href="./rfc2387">RFC 2387</a> Multipart/Related August 1998</span>
279
280
281 <span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a> Text/X-Okie</span>
282
283 The Text/X-Okie is an invented markup language permitting the
284 inclusion of images with text. A feature of this example is the
285 inclusion of two additional body parts, both picture. They are
286 referred to internally by the encapsulated document via each
287 picture's body part content-ID. Usage of "cid:", as in this example,
288 may be useful for a variety of compound objects. It is not, however,
289 a part of the Multipart/Related specification.
290
291 Content-Type: Multipart/Related; boundary=example-2;
292 start="&lt;[email protected]&gt;"
293 type="Text/x-Okie"
294
295 --example-2
296 Content-Type: Text/x-Okie; charset=iso-8859-1;
297 declaration="&lt;[email protected]&gt;"
298 Content-ID: &lt;[email protected]&gt;
299 Content-Description: Document
300
301 {doc}
302 This picture was taken by an automatic camera mounted ...
303 {image file=cid:[email protected]}
304 {para}
305 Now this is an enlargement of the area ...
306 {image file=cid:950118:[email protected]}
307 {/doc}
308 --example-2
309 Content-Type: image/jpeg
310 Content-ID: &lt;[email protected]&gt;
311 Content-Transfer-Encoding: BASE64
312 Content-Description: Picture A
313
314 [encoded jpeg image]
315 --example-2
316 Content-Type: image/jpeg
317 Content-ID: &lt;[email protected]&gt;
318 Content-Transfer-Encoding: BASE64
319 Content-Description: Picture B
320
321 [encoded jpeg image]
322 --example-2--
323
324 <span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a> Content-Disposition</span>
325
326 In the above example each image body part could also have a Content-
327 Disposition header. For example,
328
329
330
331
332 <span class="grey">Levinson Standards Track [Page 6]</span></pre>
333 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
334 <span class="grey"><a href="./rfc2387">RFC 2387</a> Multipart/Related August 1998</span>
335
336
337 --example-2
338 Content-Type: image/jpeg
339 Content-ID: &lt;[email protected]&gt;
340 Content-Transfer-Encoding: BASE64
341 Content-Description: Picture B
342 Content-Disposition: INLINE
343
344 [encoded jpeg image]
345 --example-2--
346
347 User Agents that recognize Multipart/Related will ignore the
348 Content-Disposition header's disposition type. Other User Agents
349 will process the Multipart/Related as Multipart/Mixed and may make
350 use of that header's information.
351
352 <span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. User Agent Requirements</span>
353
354 User agents that do not recognize Multipart/Related shall, in
355 accordance with [<a href="#ref-MIME" title="&quot;Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies&quot;">MIME</a>], treat the entire entity as Multipart/Mixed.
356 MIME User Agents that do recognize Multipart/Related entities but are
357 unable to process the given type should give the user the option of
358 suppressing the entire Multipart/Related body part shall be.
359
360 Existing MIME-capable mail user agents (MUAs) handle the existing
361 media types in a straightforward manner. For discrete media types
362 (e.g. text, image, etc.) the body of the entity can be directly
363 passed to a display process. Similarly the existing composite
364 subtypes can be reduced to handing one or more discrete types.
365 Handling Multipart/Related differs in that processing cannot be
366 reduced to handling the individual entities.
367
368 The following sections discuss what information the processing
369 application requires.
370
371 It is possible that an application specific "receiving agent" will
372 manipulate the entities for display prior to invoking actual
373 application process. Okie, above, is an example of this; it may need
374 a receiving agent to parse the document and substitute local file
375 names for the originator's file names. Other applications may just
376 require a table showing the correspondence between the local file
377 names and the originator's. The receiving agent takes responsibility
378 for such processing.
379
380 <span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a> Data Requirements</span>
381
382 MIME-capable mail user agents (MUAs) are required to provide the
383 application:
384
385
386
387
388 <span class="grey">Levinson Standards Track [Page 7]</span></pre>
389 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
390 <span class="grey"><a href="./rfc2387">RFC 2387</a> Multipart/Related August 1998</span>
391
392
393 (a) the bodies of the MIME entities and the entity Content-* headers,
394
395 (b) the parameters of the Multipart/Related Content-type header, and
396
397 (c) the correspondence between each body's local file name, that
398 body's header data, and, if present, the body part's content-ID.
399
400 <span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a> Storing Multipart/Related Entities</span>
401
402 The Multipart/Related media type will be used for objects that have
403 internal linkages between the body parts. When the objects are
404 stored the linkages may require processing by the application or its
405 receiving agent.
406
407 <span class="h3"><a class="selflink" id="section-6.3" href="#section-6.3">6.3</a> Recursion</span>
408
409 MIME is a recursive structure. Hence one must expect a
410 Multipart/Related entity to contain other Multipart/Related entities.
411 When a Multipart/Related entity is being processed for display or
412 storage, any enclosed Multipart/Related entities shall be processed
413 as though they were being stored.
414
415 <span class="h3"><a class="selflink" id="section-6.4" href="#section-6.4">6.4</a> Configuration Considerations</span>
416
417 It is suggested that MUAs that use configuration mechanisms, see
418 [<a href="#ref-CFG" title="&quot;A User Agent Configuration Mechanism For Multimedia Mail Format Information&quot;">CFG</a>] for an example, refer to Multipart/Related as Multi-
419 part/Related/&lt;type&gt;, were &lt;type&gt; is the value of the "type"
420 parameter.
421
422 <span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Security Considerations</span>
423
424 Security considerations relevant to Multipart/Related are identical
425 to those of the underlying content-type.
426
427 <span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Acknowledgments</span>
428
429 This proposal is the result of conversations the author has had with
430 many people. In particular, Harald A. Alvestrand, James Clark,
431 Charles Goldfarb, Gary Houston, Ned Freed, Ray Moody, and Don
432 Stinchfield, provided both encouragement and invaluable help. The
433 author, however, take full responsibility for all errors contained in
434 this document.
435
436
437
438
439
440
441
442
443
444 <span class="grey">Levinson Standards Track [Page 8]</span></pre>
445 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
446 <span class="grey"><a href="./rfc2387">RFC 2387</a> Multipart/Related August 1998</span>
447
448
449 <span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. References</span>
450
451 [<a id="ref-822">822</a>] Crocker, D., "Standard for the Format of ARPA Internet
452 Text Messages", STD 11, <a href="./rfc822">RFC 822</a>, August 1982.
453
454 [<a id="ref-CID">CID</a>] Levinson, E., and J. Clark, "Message/External-Body
455 Content-ID Access Type", <a href="./rfc1873">RFC 1873</a>, December 1995,
456 Levinson, E., "Message/External-Body Content-ID Access
457 Type", Work in Progress.
458
459 [<a id="ref-CFG">CFG</a>] Borenstein, N., "A User Agent Configuration Mechanism For
460 Multimedia Mail Format Information", <a href="./rfc1524">RFC 1524</a>, September
461 1993.
462
463 [<a id="ref-DISP">DISP</a>] Troost, R., and S. Dorner, "Communicating Presentation
464 Information in Internet Messages: The Content-
465 Disposition Header", <a href="./rfc1806">RFC 1806</a>, June 1995.
466
467 [<a id="ref-MIME">MIME</a>] Borenstein, N., and Freed, N., "Multipurpose Internet
468 Mail Extensions (MIME) Part One: Format of Internet
469 Message Bodies", <a href="./rfc2045">RFC 2045</a>, November 1996.
470
471 <span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. Author's Address</span>
472
473 Edward Levinson
474 47 Clive Street
475 Metuchen, NJ 08840-1060
476 USA
477
478 Phone: +1 908 494 1606
479 EMail: [email protected]
480
481 <span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Changes from previous draft (<a href="./rfc2112">RFC 2112</a>)</span>
482
483 Corrected cid urls to conform to <a href="./rfc2111">RFC 2111</a>; the angle brackets were
484 removed.
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500 <span class="grey">Levinson Standards Track [Page 9]</span></pre>
501 <hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
502 <span class="grey"><a href="./rfc2387">RFC 2387</a> Multipart/Related August 1998</span>
503
504
505 <span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. Full Copyright Statement</span>
506
507 Copyright (C) The Internet Society (1998). All Rights Reserved.
508
509 This document and translations of it may be copied and furnished to
510 others, and derivative works that comment on or otherwise explain it
511 or assist in its implementation may be prepared, copied, published
512 and distributed, in whole or in part, without restriction of any
513 kind, provided that the above copyright notice and this paragraph are
514 included on all such copies and derivative works. However, this
515 document itself may not be modified in any way, such as by removing
516 the copyright notice or references to the Internet Society or other
517 Internet organizations, except as needed for the purpose of
518 developing Internet standards in which case the procedures for
519 copyrights defined in the Internet Standards process must be
520 followed, or as required to translate it into languages other than
521 English.
522
523 The limited permissions granted above are perpetual and will not be
524 revoked by the Internet Society or its successors or assigns.
525
526 This document and the information contained herein is provided on an
527 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
528 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
529 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
530 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
531 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556 Levinson Standards Track [Page 10]
557 </pre>