home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / drafts / draft_ietf_j_p / draft-ietf-mhtml-spec-05.txt < prev    next >
Text File  |  1996-11-04  |  40KB  |  1,044 lines

  1. Network Working Group                                       Jacob Palme
  2. Internet Draft                                 Stockholm University/KTH
  3. draft-ietf-mhtml-spec-05.txt                          Alexander Hopmann
  4. Category-to-be: Proposed standard                ResNova Software, Inc.
  5. Expires: April 1997                                       November 1996
  6.  
  7.  
  8.  
  9.  
  10. MIME E-mail Encapsulation of Aggregate Documents, such as HTML (MHTML)
  11.  
  12.  
  13.  
  14. Status of this Document
  15.  
  16.  
  17. This document is an Internet-Draft. Internet-Drafts are working
  18. documents of the Internet Engineering Task Force (IETF), its areas, and
  19. its working groups. Note that other groups may also distribute working
  20. documents as Internet-Drafts.
  21.  
  22. Internet-Drafts are draft documents valid for a maximum of six months
  23. and may be updated, replaced, or obsoleted by other documents at any
  24. time. It is inappropriate to use Internet-Drafts as reference material
  25. or to cite them other than as ``work in progress.''
  26.  
  27. To learn the current status of any Internet-Draft, please check the
  28. ``1id-abstracts.txt'' listing contained in the Internet-Drafts Shadow
  29. Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
  30. munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
  31. ftp.isi.edu (US West Coast).
  32.  
  33.  
  34. Abstract
  35.  
  36. Although HTML [RFC 1866] was designed within the context of MIME, more
  37. than the specification of HTML as defined in RFC 1866 is needed for two
  38. electronic mail user agents to be able to interoperate using HTML as a
  39. document format. These issues include the naming of objects that are
  40. normally referred to by URIs, and the means of aggregating objects that
  41. go together. This document describes a set of guidelines that will allow
  42. conforming mail user agents to be able to send, deliver and display
  43. these objects, such as HTML objects, that can contain links represented
  44. by URIs. In order to be able to handle inter-linked objects, the
  45. document uses the MIME type multipart/related and specifies the MIME
  46. content-headers "Content-Location" and "Content-Base".
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. draft-ietf-mhtml-spec-05.txt                            November 1996
  59. Palme-Hopmann      Do not implement based on this draft      [Page 1]
  60.  
  61. Table of Contents
  62.  
  63. 1. Introduction
  64. 2. Terminology
  65.    2.1 Conformance requirement terminology
  66.    2.2 Other terminology
  67. 4. The Content-Location and Content-Base MIME Content Headers
  68.    4.1 MIME content headers
  69.    4.2 The Content-Base header
  70.    4.3 The Content-Location Header
  71.    4.4 Encoding of URIs in e-mail headers
  72. 5. Base URIs for resolution of relative URIs
  73. 6. Sending documents without linked objects
  74. 7. Use of the Content-Type: Multipart/related
  75. 8. Format of Links to Other Body Parts
  76.    8.1 General principle
  77.    8.2 Use of the Content-Location header
  78.    8.3 Use of the Content-ID header and CID URLs
  79. 9 Examples
  80.    9.1 Example of a HTML body without included linked objects
  81.    9.3 Example with relative URIs to an embedded GIF picture
  82.    9.4 Example using CID URL and Content-ID header to an embedded GIF
  83.         picture
  84. 10. Content-Disposition header
  85. 11. Character encoding issues and end-of-line issues
  86. 12. Security Considerations
  87. 13. Acknowledgments
  88. 14. References
  89. 15. Author's Address
  90.  
  91.  
  92. Mailing List Information
  93.  
  94. Further discussion on this document should be done through the mailing
  95. list MHTML@SEGATE.SUNET.SE.
  96.  
  97. To subscribe to this list, send a message to
  98.    LISTSERV@SEGATE.SUNET.SE
  99. which contains the text
  100. SUB MHTML <your name (not your e-mail address)>
  101.  
  102. Archives of this list are available by anonymous ftp from
  103.    FTP://SEGATE.SUNET.SE/lists/mHTML/
  104. The archives are also available by e-mail. Send a message to
  105. LISTSERV@SEGATE.SUNET.SE with the text "INDEX MHTML" to get a list of
  106. the archive files, and then a new message "GET <file name>" to retrieve
  107. the archive files.
  108.  
  109. Comments on less important details may also be sent to the editor, Jacob
  110. Palme <jpalme@dsv.su.se>.
  111.  
  112. More information may also be available at URL:
  113. HTTP://www.dsv.su.se/~jpalme/ietf/jp-ietf-home.HTML
  114.  
  115.  
  116. draft-ietf-mhtml-spec-05.txt                            November 1996
  117. Palme-Hopmann      Do not implement based on this draft      [Page 2]
  118.  
  119.  
  120. 1. Introduction
  121.  
  122. There are a number of document formats, HTML [HTML2], PDF [PDF] and VRML
  123. for example, which provide links using URIs for their resolution. There
  124. is an obvious need to be able to send documents in these formats in
  125. e-mail [RFC821=SMTP, RFC822]. This document gives additional
  126. specifications on how to send such documents in MIME [RFC 1521=MIME1]
  127. e-mail messages. This version of this standard was based on full
  128. consideration only of the needs for objects with links in the Text/HTML
  129. media type (as defined in RFC 1866 [HTML2]), but the standard may still
  130. be applicable also to other formats for sets of interlinked objects,
  131. linked by URIs. There is no conformance requirement that implementations
  132. claiming conformance to this standard are able to handle URI-s in other
  133. document formats than HTML.
  134.  
  135. URIs in documents in HTML and other similar formats reference other
  136. objects and resources, either embedded or directly accessible through
  137. hypertext links. When mailing such a document, it is often desirable to
  138. also mail all of the additional resources that are referenced in it;
  139. those elements are necessary for the complete interpretation of the
  140. primary object.
  141.  
  142. An alternative way for sending an HTML document or other object
  143. containing URIs in e-mail is to only send the URL, and let the recipient
  144. look up the document using HTTP. That method is described in [URLBODY]
  145. and is not described in this document.
  146.  
  147. An informational RFC [MHTML-INFO] will be published as a supplement to
  148. this standard. The informational RFC will discuss implementation methods
  149. and some implementation problems. Implementors are recommended to read
  150. this informational RFC when developing implementations of the MHTML
  151. standard.
  152.  
  153.  
  154. 2. Terminology
  155.  
  156. 2.1 Conformance requirement terminology
  157.  
  158. This specification uses the same words as RFC 1123 [HOSTS] for defining
  159. the significance of each particular requirement. These words are:
  160.  
  161.  
  162. MUST    This word or the adjective "required" means that the item is
  163.         an absolute requirement of the specification.
  164.  
  165. SHOULD  This word or the adjective "recommended" means that there may
  166.         exist valid reasons in particular circumstances to ignore this
  167.         item, but the full implications should be understood and the
  168.         case carefully weighed before choosing a different course.
  169.  
  170.  
  171.  
  172.  
  173.  
  174. draft-ietf-mhtml-spec-05.txt                            November 1996
  175. Palme-Hopmann      Do not implement based on this draft      [Page 3]
  176.  
  177. MAY     This word or the adjective "optional" means that this item is
  178.         truly optional. One vendor may choose to include the item
  179.         because a particular marketplace requires it or because it
  180.         enhances the product, for example; another vendor may omit the
  181.         same item.
  182.  
  183. An implementation is not compliant if it fails to satisfy one or more of
  184. the MUST requirements for the protocols it implements. An implementation
  185. that satisfies all the MUST and all the SHOULD requirements for its
  186. protocols is said to be "unconditionally compliant"; one that satisfies
  187. all the MUST requirements but not all the SHOULD requirements for its
  188. protocols is said to be "conditionally compliant."
  189.  
  190.  
  191. 2.2 Other terminology
  192.  
  193. Most of the terms used in this document are defined in other RFCs.
  194.  
  195. Absolute URI,         See RFC 1808 [RELURL].
  196. AbsoluteURI
  197.  
  198. CID                   See [MIDCID].
  199.  
  200. Content-Base          See section 4.2 below.
  201.  
  202. Content-ID            See [MIDCID].
  203.  
  204. Content-Location      MIME message or content part header with the URI of
  205.                       the MIME message or content part body, defined in
  206.                       section 4.3 below.
  207.  
  208. Content-Transfer-Enco Conversion of a text into 7-bit octets as specified
  209. ding                  in [MIME1].
  210.  
  211. CR                    See [RFC822].
  212.  
  213. CRLF                  See [RFC822].
  214.  
  215. Displayed text        The text shown to the user reading a document with
  216.                       a web browser. This may be different from the HTML
  217.                       markup, see the definition of HTML markup below.
  218.  
  219. Header                Field in a message or content heading specifying
  220.                       the value of one attribute.
  221.  
  222. Heading               Part of a message or content before the first
  223.                       CRLFCRLF, containing formatted fields with
  224.                       attributes of the message or content.
  225.  
  226. HTML                  See RFC 1866 [HTML2].
  227.  
  228. HTML Aggregate        HTML objects together with some or all objects, to
  229. objects               which the HTML object contains hyperlinks.
  230.  
  231.  
  232. draft-ietf-mhtml-spec-05.txt                            November 1996
  233. Palme-Hopmann      Do not implement based on this draft      [Page 4]
  234.  
  235. HTML markup           A file containing HTML encodings as specified in
  236.                       [HTML] which may be different from the displayed
  237.                       text which a person using a web browser sees. For
  238.                       example, the HTML markup may contain "<" where
  239.                       the displayed text contains the character "<".
  240.  
  241. LF                    See [RFC822].
  242.  
  243. MIC                   Message Integrity Codes, codes use to verify that a
  244.                       message has not been modified.
  245.  
  246. MIME                  See RFC 1521 [MIME1], [MIME2].
  247.  
  248. MUA                   Messaging User Agent.
  249.  
  250. PDF                   Portable Document Format, see [PDF].
  251.  
  252. Relative URI,         See RFC 1866 [HTML2] and RFC 1808[RELURL].
  253. RelativeURI
  254.  
  255. URI, absolute and     See RFC 1866 [HTML2].
  256. relative
  257.  
  258. URL                   See RFC 1738 [URL].
  259.  
  260. URL, relative         See [RELURL].
  261.  
  262. VRML                  Virtual Reality Markup Language.
  263.  
  264.  
  265. 3. Overview
  266.  
  267. An aggregate document is a MIME-encoded message that contains a root
  268. document as well as other data that is required in order to represent
  269. that document (inline pictures, style sheets, applets, etc.). Aggregate
  270. documents can also include additional elements that are linked to the
  271. first object.  It is important to keep in mind the differing needs of
  272. several audiences. Mail sending agents might send aggregate documents as
  273. an encoding of normal day-to-day electronic mail. Mail sending agents
  274. might also send aggregate documents when a user wishes to mail a
  275. particular document from the web to someone else. Finally mail sending
  276. agents might send aggregate documents as automatic responders, providing
  277. access to WWW resources for non-IP connected clients.
  278.  
  279. Mail receiving agents also have several differing needs. Some mail
  280. receiving agents might be able to receive an aggregate document and
  281. display it just as any other text content type would be displayed.
  282. Others might have to pass this aggregate document to a browsing program,
  283. and provisions need to be made to make this possible.
  284.  
  285. Finally several other constraints on the problem arise. It is important
  286. that it be possible for a document to be signed and for it to be able to
  287. be transmitted to a client and displayed with a minimum risk of breaking
  288. the message integrity (MIC) check that is part of the signature.
  289.  
  290. draft-ietf-mhtml-spec-05.txt                            November 1996
  291. Palme-Hopmann      Do not implement based on this draft      [Page 5]
  292.  
  293.  
  294. 4. The Content-Location and Content-Base MIME Content Headers
  295.  
  296. 4.1 MIME content headers
  297.  
  298. In order to resolve URI references to other body parts, two MIME content
  299. headers are defined, Content-Location and Content-Base. Both these
  300. headers can occur in any message or content heading, and will then be
  301. valid within this heading and for its content.
  302.  
  303. In practice, at present only those URIs which are URLs are used, but it
  304. is anticipated that other forms of URIs will in the future be used.
  305.  
  306. The syntax for these headers is, using the syntax definition tools from
  307. [RFC822]:
  308.  
  309.     content-location ::= "Content-Location:" ( absoluteURI | relativeURI
  310. )
  311.  
  312.     content-base ::= "Content-Base:" absoluteURI
  313.  
  314. where URI is at present (June 1996) restricted to the syntax for URLs as
  315. defined in RFC 1738 [URL].
  316.  
  317. These two headers are valid only for exactly the content heading or
  318. message heading where they occurs and its text. They are thus not valid
  319. for the parts inside multipart headings, and are thus meaningless in
  320. multipart headings.
  321.  
  322. These two headers may occur both inside and outside of a
  323. multipart/related part.
  324.  
  325. 4.2 The Content-Base header
  326.  
  327. The Content-Base gives a base for relative URIs occurring in other
  328. heading fields and in HTML documents which do not have any BASE element
  329. in its HTML code. Its value MUST be an absolute URI.
  330.  
  331. Example showing which Content-Base is valid where:
  332.  
  333.    Content-Type: Multipart/related; boundary="boundary-example-1";
  334.                  type=Text/HTML; start=foo2*foo3@bar2.net
  335.     ; A Content-Base header cannot be placed here, since this is a
  336.     ; multipart MIME object.
  337.  
  338.    --boundary-example-1
  339.  
  340.    Part 1:
  341.    Content-Type: Text/HTML; charset=US-ASCII
  342.    Content-ID: <foo2*foo3@bar2.net>
  343.    Content-Location: http/www.ietf.cnir.reston.va.us/images/foo1.bar1
  344.    ;  This Content-Location must contain an absolute URI, since no base
  345.    ;  is valid here.
  346.  
  347.  
  348. draft-ietf-mhtml-spec-05.txt                            November 1996
  349. Palme-Hopmann      Do not implement based on this draft      [Page 6]
  350.  
  351.    --boundary-example-1
  352.  
  353.    Part 2:
  354.    Content-Type: Text/HTML; charset=US-ASCII
  355.    Content-ID: <foo4*foo5@bar2.net>
  356.    Content-Location: foo1.bar1   ; The Content-Base below applies to
  357.                                  ; this relative URI
  358.    Content-Base: http:/www.ietf.cnri.reston.va.us/images/
  359.  
  360.    --boundary-example-1--
  361.  
  362. 4.3 The Content-Location Header
  363.  
  364. The Content-Location header specifies the URI that corresponds to the
  365. content of the body part in whose heading the header is placed. Its
  366. value CAN be an absolute or relative URI. Any URI or URL scheme may be
  367. used, but use of non-standardized URI or URL schemes might entail some
  368. risk that recipients cannot handle them correctly.
  369.  
  370. The Content-Location header can be used to indicate that the data sent
  371. under this heading is also retrievable, in identical format, through
  372. normal use of this URI. If used for this purpose, it must contain an
  373. absolute URI or be resolvable, through a Content-Base header, into an
  374. absolute URI. In this case, the information sent in the message can be
  375. seen as a cached version of the original data.
  376.  
  377. The header can also be used for data which is not available to some or
  378. all recipients of the message, for example if the header refers to an
  379. object which is only retrievable using this URI in a restricted domain,
  380. such as within a company-internal web space. The header can even contain
  381. a fictious URI and need in that case not be globally unique.
  382.  
  383. Example:
  384.  
  385. Content-Type: Multipart/related; boundary="boundary-example-1";
  386.                  type=Text/HTML
  387.  
  388.    --boundary-example-1
  389.  
  390.    Part 1:
  391.    Content-Type: Text/HTML; charset=US-ASCII
  392.  
  393.    ... ... <IMG SRC="fiction1/fiction2"> ... ...
  394.  
  395.    --boundary-example-1
  396.  
  397.    Part 2:
  398.    Content-Type: Text/HTML; charset=US-ASCII
  399.    Content-Location: fiction1/fiction2
  400.  
  401.    --boundary-example-1--
  402.  
  403.  
  404.  
  405.  
  406. draft-ietf-mhtml-spec-05.txt                            November 1996
  407. Palme-Hopmann      Do not implement based on this draft      [Page 7]
  408.  
  409. 4.4 Encoding of URIs in e-mail headers
  410.  
  411. Since MIME header fields have a limited length and URIs can get quite
  412. long, these lines may have to be folded. If such folding is done, the
  413. algorithm defined in [URLBODY] section 3.1 should be employed.
  414.  
  415.  
  416. 5. Base URIs for resolution of relative URIs
  417.  
  418. Relative URIs inside contents of MIME body parts are resolved relative
  419. to a base URI. In order to determine this base URI, the first-applicable
  420. method in the following list applies.
  421.  
  422.   (a) There is a base specification inside the MIME body part
  423.        containing the link which resolves relative URIs into absolute
  424.        URIs. For example, HTML provides the BASE element for this.
  425.  
  426.   (b) There is a Content-Base header (as defined in section 4.2),
  427.        specifying the base to be used.
  428.  
  429.   (c) There is a Content-Location header in the heading of the body
  430.        part which can then serve as the base in the same way as the
  431.        requested URI can serve as a base for relative URIs within a
  432.        file retrieved via HTTP [HTTP].
  433.  
  434. When the methods above do not yield an absolute URI the procedure in
  435. section 8.2 for matching relative URIs MUST be followed.
  436.  
  437.  
  438. 6. Sending documents without linked objects
  439.  
  440. If a document, such as an HTML object, is sent without other objects, to
  441. which it is linked, it MAY be sent as a Text/HTML body part by itself.
  442. In this case, multipart/related need not be used.
  443.  
  444. Such a document may either not include any links, or contain links which
  445. the recipient resolves via ordinary net look up, or contain links which
  446. the recipient cannot resolve.
  447.  
  448. Inclusion of links which the recipient has to look up through the net
  449. may not work for some recipients, since all e-mail recipients do not
  450. have full internet connectivity. Also, such links may work for the
  451. sender but not for the recipient, for example when the link refers to an
  452. URI within a company-internal network not accessible from outside the
  453. company.
  454.  
  455. Note that documents with links that the recipient cannot resolve MAY be
  456. sent, although this is discouraged. For example, two persons developing
  457. a new HTML page may exchange incomplete versions.
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464. draft-ietf-mhtml-spec-05.txt                            November 1996
  465. Palme-Hopmann      Do not implement based on this draft      [Page 8]
  466.  
  467.  
  468. 7. Use of the Content-Type: Multipart/related
  469.  
  470. If a message contains one or more MIME body parts containing links and
  471. also contains as separate body parts, data, to which these links (as
  472. defined, for example, in RFC 1866 [HTML2]) refers, then this whole set
  473. of body parts (referring body parts and referred-to body parts) SHOULD
  474. be sent within a multipart/related body part as defined in [REL].
  475.  
  476. The root body part of the multipart/related SHOULD be the start object
  477. for rendering the object, such as a text/html object, and which contains
  478. links to objects in other body parts, or a multipart/alternative of
  479. which at least one alternative resolves to such a start object.
  480. Implementors are warned, however, that many mail programs treat
  481. multipart/alternative as if it had been multipart/mixed (even though
  482. MIME [MIME1] requires support for multipart/alternative).
  483.  
  484. [REL] requires that the type attribute of the "Content-Type:
  485. Multipart/related" statement be the type of the root object, and this
  486. value can thus be "multipart/alternative". If the root is not the first
  487. body part within the multipart/related, [REL] further requires that its
  488. Content-ID MUST be given in a start parameter to the "Content-Type:
  489. Multipart/related" header.
  490.  
  491. When presenting the root body part to the user, the additional body
  492. parts within the multipart/related can be used:
  493.  
  494.     (a) For those recipients who only have e-mail but not full Internet
  495.         access.
  496.  
  497.     (b) For those recipients who for other reasons, such as firewalls
  498.         or the use of company-internal links, cannot retrieve the
  499.         linked body parts through the net.
  500.  
  501.        Note that this means that you can, via e-mail, send HTML which
  502.         includes URIs which the recipient cannot resolve via HTTPor
  503.         other connectivity-requiring URIs.
  504.  
  505.     (c) For items which are not available on the web.
  506.  
  507.     (d) For any recipient to speed up access.
  508.  
  509. The type parameter of the "Content-Type: Multipart/related" MUST be the
  510. same as the Content-Type of its root.
  511.  
  512. When a sending MUA sends objects which were retrieved from the WWW, it
  513. SHOULD maintain their WWW URIs. It SHOULD not transform these URIs into
  514. some other URI form prior to transmitting them. This will allow the
  515. receiving MUA to both verify MICs included with the email message, as
  516. well as verify the documents against their WWW counterpoints.
  517.  
  518.  
  519.  
  520.  
  521.  
  522. draft-ietf-mhtml-spec-05.txt                            November 1996
  523. Palme-Hopmann      Do not implement based on this draft      [Page 9]
  524.  
  525. In certain special cases this will not work if the original HTML
  526. document contains URIs as parameters to objects and applets. In such a
  527. case, it might be better to rewrite the document before sending it. This
  528. problem is discussed in more detail in the informational RFC which will
  529. be published as a supplement to this standard.
  530.  
  531. This standard does not cover the case where a multipart/related contains
  532. links to MIME body parts outside of the current multipart/related or in
  533. other MIME messages, even if methods similar to those described in this
  534. standard are used. Implementors who provide such links are warned that
  535. mailers implementing this standard may not be able to resolve such
  536. links.
  537.  
  538. Within such a multipart/related, ALL different parts MUST have different
  539. Content-Location or Content-ID values.
  540.  
  541.  
  542. 8. Format of Links to Other Body Parts
  543.  
  544. 8.1 General principle
  545.  
  546. A body part, such as a text/HTML body part, may contain hyperlinks to
  547. objects which are included as other body parts in the same message and
  548. within the same multipart/related content. Often such linked objects are
  549. meant to be displayed inline to the reader of the main document; for
  550. example, objects referenced with the IMG tag in HTML [RFC 1866=HTML2].
  551. New tags with this property are proposed in the ongoing development of
  552. HTML (example: applet, frame).
  553.  
  554. In order to send such messages, there is a need to indicate which other
  555. body parts are referred to by the links in the body parts containing
  556. such links. For example, a body part of Content-Type: Text/HTML often
  557. has links to other objects, which might be included in other body parts
  558. in the same MIME message. The referencing of other body parts is done in
  559. the following way: For each body part containing links and each distinct
  560. URI within it, which refers to data which is sent in the same MIME
  561. message, there SHOULD be a separate body part within the current
  562. multipart/related part of the message containing this data. Each such
  563. body part SHOULD contain a Content-Location header (see section 8.2) or
  564. a Content-ID header (see section 8.3).
  565.  
  566. An e-mail system which claims conformance to this standard MUST support
  567. receipt of multipart/related (as defined in section 7) with links
  568. between body parts using both the Content-Location (as defined in
  569. section 8.2) and the Content-ID method (as defined in section 8.3).
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580. draft-ietf-mhtml-spec-05.txt                            November 1996
  581. Palme-Hopmann      Do not implement based on this draft      [Page 10]
  582.  
  583. 8.2 Use of the Content-Location header
  584.  
  585. If there is a Content-Base header, then the recipient MUST employ
  586. relative to absolute resolution as defined in RFC 1808 [RELURL] of
  587. relative URIs in both the HTML markup and the Content-Location header
  588. before matching a hyperlink in the HTML markup to a Content-Location
  589. header. The same applies if the Content-Location contains an absolute
  590. URI, and the HTML markup contains a BASE element so that relative URIs
  591. in the HTML markup can be resolved.
  592.  
  593. If there is NO Content-Base header, and the Content-Location header
  594. contains a relative URI, then NO relative to absolute resolution SHOULD
  595. be performed. Matching the relative URI in the Content-Location header
  596. to a hyperlink in an HTML markup text is in this case a two step
  597. process. First remove any LWSP from the relative URI which may have been
  598. introduced as described in section 4.4. Then perform an exact textual
  599. match against the HTML URIs. For this matching process, ignore BASE
  600. specifications, such as the BASE element in HTML. Note that this only
  601. applies for matching Content-Location headers, not for URL-s in the HTML
  602. document which are resolved through network look up at read time.
  603.  
  604. The URI in the Content-Location header need not refer to an object which
  605. is actually available globally for retrieval using this URI (after
  606. resolution of relative URIs). However, URI-s in Content-Location headers
  607. (if absolute, or resolvable to absolute URIs) SHOULD still be globally
  608. unique.
  609.  
  610. 8.3 Use of the Content-ID header and CID URLs
  611.  
  612. When CID (Content-ID) URLs as defined in RFC 1738 [URL] and RFC 1873
  613. [MIDCID] are used for links between body parts, the Content-Location
  614. statement will normally be replaced by a Content-ID header. Thus, the
  615. following two headers are identical in meaning:
  616.  
  617. Content-ID: foo@bar.net
  618. Content-Location: CID: foo@bar.net
  619.  
  620. Note: Content-IDs MUST be globally unique [MIME1]. It is thus not
  621. permitted to make them unique only within this message or within this
  622. multipart/related.
  623.  
  624.  
  625. 9 Examples
  626.  
  627. 9.1 Example of a HTML body without included linked objects
  628.  
  629. The first example is the simplest form of an HTML email message. This is
  630. not an aggregate HTML object, but simply a message with a single HTML
  631. body part. This message contains a hyperlink but does not provide the
  632. ability to resolve the hyperlink. To resolve the hyperlink the receiving
  633. client would need either IP access to the Internet, or an electronic
  634. mail web gateway.
  635.  
  636.  
  637.  
  638. draft-ietf-mhtml-spec-05.txt                            November 1996
  639. Palme-Hopmann      Do not implement based on this draft      [Page 11]
  640.  
  641.    From: foo1@bar.net
  642.    To: foo2@bar.net
  643.    Subject: A simple example
  644.    Mime-Version: 1.0
  645.    Content-Type: Text/HTML; charset=US-ASCII
  646.  
  647.    <HTML>
  648.    <head></head>
  649.    <body>
  650.    <h1>Hi there!</h1>
  651.    An example of an HTML message.<p>
  652.    Try clicking <a href="http://www.resnova.com/">here.</a><p>
  653.    </body></HTML>
  654.  
  655. 9.2 Example with absolute URIs to an embedded GIF picture:
  656.  
  657. From: foo1@bar.net
  658.    To: foo2@bar.net
  659.    Subject: A simple example
  660.    Mime-Version: 1.0
  661.    Content-Type: Multipart/related; boundary="boundary-example-1";
  662.                  type=Text/HTML; start=foo3*foo1@bar.net
  663.  
  664. --boundary-example 1
  665.       Content-Type: Text/HTML;charset=US-ASCII
  666.       Content-ID: <foo3*foo1@bar.net>
  667.  
  668.       ... text of the HTML document, which might contain a hyperlink
  669.       to the other body part, for example through a statement such as:
  670.       <IMG SRC="http://www.ietf.cnri.reston.va.us/images/ietflogo.gif"
  671.        ALT="IETF logo">
  672.  
  673.       --boundary-example-1
  674.       Content-Location:
  675.             http://www.ietf.cnri.reston.va.us/images/ietflogo.gif
  676.       Content-Type: IMAGE/GIF
  677.       Content-Transfer-Encoding: BASE64
  678.  
  679.       R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
  680.       NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
  681.       etc...
  682.  
  683.       --boundary-example-1--
  684.  
  685. 9.3 Example with relative URIs to an embedded GIF picture
  686.  
  687.    From: foo1@bar.net
  688.    To: foo2@bar.net
  689.    Subject: A simple example
  690.    Mime-Version: 1.0
  691.    Content-Base: http://www.ietf.cnri.reston.va.us
  692.    Content-Type: Multipart/related; boundary="boundary-example-1";
  693.                  type=Text/HTML
  694.  
  695.  
  696. draft-ietf-mhtml-spec-05.txt                            November 1996
  697. Palme-Hopmann      Do not implement based on this draft      [Page 12]
  698.  
  699.       --boundary-example 1
  700.       Content-Type: Text/HTML; charset=ISO-8859-1
  701.       Content-Transfer-Encoding: QUOTED-PRINTABLE
  702.  
  703.       ... text of the HTML document, which might contain a hyperlink
  704.       to the other body part, for example through a statement such as:
  705.       <IMG SRC="/images/ietflogo.gif" ALT="IETF logo">
  706.       Example of a copyright sign encoded with Quoted-Printable: =A9
  707.       Example of a copyright sign mapped onto HTML markup: ¨
  708.  
  709.       --boundary-example-1
  710.       Content-Location: "/images/ietflogo.gif"
  711.       Content-Type: IMAGE/GIF
  712.       Content-Transfer-Encoding: BASE64
  713.  
  714.       R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
  715.       NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
  716.       etc...
  717.  
  718.       --boundary-example-1--
  719.  
  720. 9.4 Example using CID URL and Content-ID header to an embedded GIF
  721. picture
  722.  
  723.    From: foo1@bar.net
  724.    To: foo2@bar.net
  725.    Subject: A simple example
  726.    Mime-Version: 1.0
  727.    Content-Type: Multipart/related; boundary="boundary-example-1";
  728.                  type=Text/HTML
  729.  
  730.       --boundary-example 1
  731.       Content-Type: Text/HTML; charset=US-ASCII
  732.  
  733.       ... text of the HTML document, which might contain a hyperlink
  734.       to the other body part, for example through a statement such as:
  735.       <IMG SRC="cid:foo4*foo1@bar.net" ALT="IETF logo">
  736.  
  737.       --boundary-example-1
  738.       Content-ID: <foo4*foo1@bar.net>
  739.       Content-Type: IMAGE/GIF
  740.       Content-Transfer-Encoding: BASE64
  741.  
  742.       R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
  743.       NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
  744.       etc...
  745.  
  746.       --boundary-example-1--
  747.  
  748.  
  749. 10. Content-Disposition header
  750.  
  751. Note the specification in [REL] on the relations between
  752. Content-Disposition and multipart/related.
  753.  
  754. draft-ietf-mhtml-spec-05.txt                            November 1996
  755. Palme-Hopmann      Do not implement based on this draft      [Page 13]
  756.  
  757.  
  758. 11. Character encoding issues and end-of-line issues
  759.  
  760. For the encoding of characters in HTML documents and other text
  761. documents into a MIME-compatible octet stream, the following mechanisms
  762. are relevant:
  763.  
  764. - HTML [HTML2, HTML-I18N] as an application of SGML [SGML] allows
  765.   characters to be denoted by character entities as well as by numeric
  766.   character references (e.g. "Latin small letter a with acute accent"
  767.   may be represented by "á" or "á") in the HTML markup.
  768.  
  769. - HTML documents, in common with other documents of the MIME
  770. "Content-Type
  771.   text", can be represented in MIME using one of several character
  772.   encodings. The MIME Content-Type "charset" parameter value indicates
  773.   the particular encoding used. For the exact meaning and use of the
  774.   "charset" parameter, please see [MIME-IMB section 4.2].
  775.  
  776.   Note that the "charset" parameter refers only to the MIME character
  777.   encoding. For example, the string "á" can be sent in MIME with
  778.   "charset=US-ASCII", while the raw character "Latin small letter a with
  779.   acute accent" cannot.
  780.  
  781. The above mechanisms are well defined and documented, and therefore not
  782. further explained here. In sending a message, all the above mentioned
  783. mechanisms MAY be used, and any mixture of them MAY occur when sending
  784. the document via e-mail. Receiving mail user agents (together with any
  785. Web browser they may use to display the document) MUST be capable of
  786. handling any combinations of these mechanisms.
  787.  
  788. Also note that:
  789.  
  790. - Any documents including HTML documents that contain octet values
  791. outside
  792.   the 7-bit range need a content-transfer-encoding applied before
  793.   transmission over certain transport protocols [MIME1, chapter 5].
  794.  
  795. - The MIME standard [MIME1] requires that documents of "Content-Type:
  796. Text
  797.   MUST be in canonical form before Content-Transfer-Encoding, i.e. that
  798.   line breaks are encoded as CRLFs, not as bare CRs or bare LFs or
  799.   something else. This is in contrast to [HTTP] where section 3.6.1
  800.   allows other representations of line breaks.
  801.  
  802. Note that this might cause problems with integrity checks based on
  803. checksums, which might not be preserved when moving a document from the
  804. HTTP to the MIME environment. If a document has to be converted in such
  805. a way that a checksum integrity check becomes invalid, then this
  806. integrity check header SHOULD be removed from the document.
  807.  
  808.  
  809.  
  810.  
  811. draft-ietf-mhtml-spec-05.txt                            November 1996
  812. Palme-Hopmann      Do not implement based on this draft      [Page 14]
  813.  
  814. Other sources of problems are Content-Encoding used in HTTP but not
  815. allowed in MIME, and charsets that are not able to represent line breaks
  816. as CRLF. A good overview of the differences between HTTP and MIME with
  817. regards to "Content-Type: Text" can be found in [HTTP], appendix C.
  818.  
  819. If the original document has line breaks in the canonical form (CRLF),
  820. then the document SHOULD remain unconverted so that integrity check sums
  821. are not invalidated.
  822.  
  823. A provider of HTML documents who wants his documents to be transferable
  824. via both HTTP and SMTP without invalidating checksum integrity checks,
  825. should always provide original documents in the canonical form with CRLF
  826. for line breaks.
  827.  
  828. Some transport mechanisms may specify a default "charset" parameter if
  829. none is supplied [HTTP, MIME1]. Because the default differs for
  830. different mechanisms, when HTML is transferred through mail, the charset
  831. parameter SHOULD be included, rather than relying on the default.
  832.  
  833.  
  834. 12. Security Considerations
  835.  
  836. Some Security Considerations include the potential to mail someone an
  837. object, and claim that it is represented by a particular URI (by giving
  838. it a Content-Location header). There can be no assurance that a WWW
  839. request for that same URI would normally result in that same object. It
  840. might be unsuitable to cache the data in such a way that the cached data
  841. can be used for retrieval of this URI from other messages or message
  842. parts than those included in the same message as the Content-Location
  843. header. Because of this problem, receiving User Agents SHOULD not cache
  844. this data in the same way that data that was retrieved through an HTTP
  845. or FTP request might be cached.
  846.  
  847. URLs, especially File URLs, may in their name contain company-internal
  848. information, which may then inadvertently be revealed to recipients of
  849. documents containing such URLs.
  850.  
  851. One way of implementing messages with linked body parts is to handle the
  852. linked body parts in a combined mail and WWW proxy server. The mail
  853. client is only given the start body part, which it passes to a web
  854. browser. This web browser requests the linked parts from the proxy
  855. server. If this method is used, and if the combined server is used by
  856. more than one user, then methods must be employed to ensure that body
  857. parts of a message to one person is not retrievable by another person.
  858. Use of passwords (also known as tickets or magic cookies) is one way of
  859. achieving this. Note that some caching WWW proxy servers may not
  860. distinguish between cached objects from e-mail and HTTP, which may be a
  861. security risk.
  862.  
  863. In addition, by allowing people to mail aggregate objects, we are
  864. opening the door to other potential security problems that until now
  865. were only problems for WWW users. For example, some HTML documents now
  866. either themselves contain executable content (JavaScript) or contain
  867. links to executable content (The "INSERT" specification, Java). It would
  868.  
  869. draft-ietf-mhtml-spec-05.txt                            November 1996
  870. Palme-Hopmann      Do not implement based on this draft      [Page 15]
  871.  
  872. be exceedingly dangerous for a receiving User Agent to execute content
  873. received through a mail message without careful attention to
  874. restrictions on the capabilities of that executable content.
  875.  
  876. Some WWW applications hide passwords and tickets (access tokens to
  877. information which may not be available to anyone) and other sensitive
  878. information in hidden fields in the web documents or in on-the-fly
  879. constructed URLs. If a person gets such a document, and forwards it via
  880. e-mail, the person may inadvertently disclose sensitive information.
  881.  
  882.  
  883. 13. Acknowledgments
  884.  
  885. Harald T. Alvestrand, Richard Baker, Dave Crocker, Martin J. Duerst,
  886. Lewis Geer, Roy Fielding, Al Gilman, Paul Hoffman, Richard W. Jesmajian,
  887. Mark K. Joseph, Greg Herlihy, Valdis Kletnieks, Daniel LaLiberte, Ed
  888. Levinson, Jay Levitt, Albert Lunde, Larry Masinter, Keith Moore, Gavin
  889. Nicol, Pete Resnick, Jon Smirl, Einar Stefferud, Jamie Zawinski, Steve
  890. Zilles and several other people have helped us with preparing this
  891. document. I alone take responsibility for any errors which may still be
  892. in the document.
  893.  
  894.  
  895. 14. References
  896.  
  897. Ref.            Author, title
  898. ---------       --------------------------------------------------------
  899.  
  900. [CONDISP]       R. Troost, S. Dorner: "Communicating Presentation
  901.                 Information in Internet Messages: The
  902.                 Content-Disposition Header", RFC 1806, June 1995.
  903.  
  904. [HOSTS]         R. Braden (editor): "Requirements for Internet Hosts --
  905.                 Application and Support", STD-3, RFC 1123,November 1989.
  906.  
  907. [HTML-I18N]     F. Yergeau, G. Nicol, G. Adams, & M. Duerst:
  908.                 "Internationalization  of the Hypertext Markup
  909.                 Language". draft-ietf-html-i18n-05.txt, May 1996.
  910.  
  911. [HTML2]         T. Berners-Lee, D. Connolly: "Hypertext Markup Language
  912.                 - 2.0", RFC 1866, November 1995.
  913.  
  914. [HTTP]          T. Berners-Lee, R. Fielding, H. Frystyk: Hypertext
  915.                 Transfer Protocol -- HTTP/1.0. RFC 1945, May 1996.
  916.  
  917. [MD5]           R. Rivest: "The MD5 Message-Digest Algorithm", RFC 1321,
  918.                 April 1992.
  919.  
  920. [MHTML-INFO]    J. Palme: "Sending HTML in E-mail, an informational
  921.                 supplement to RFC ???: MIME E-mail Encapsulation of
  922.                 Aggregate HTML Documents (MHTML)", to be published as an
  923.                 informational supplement to the MHTML standard.
  924.  
  925.  
  926.  
  927. draft-ietf-mhtml-spec-05.txt                            November 1996
  928. Palme-Hopmann      Do not implement based on this draft      [Page 1]
  929.  
  930. [MIDCID]        E. Levinson: "
  931.                 Message/External-Body Content-ID AccessContent-ID and
  932.                 Message-ID Uniform Resource Locators",
  933.                 draft-ietf-mhtml-cid-00.txt, August 1996.
  934.  
  935. [MIME-IMB]      N. Freed & N. Borenstein: "Multipurpose Internet Mail
  936.                 Extensions (MIME) Part One: Format of Internet Message
  937.                 Bedies". draft-ietf-822ext-mime-imb-07.txt, June 1996.
  938.  
  939. [MIME1]         N. Borenstein & N. Freed: "MIME (Multipurpose Internet
  940.                 Mail Extensions) Part One: Mechanisms for Specifying and
  941.                 Describing the Format of Internet Message Bodies", RFC
  942.                 1521, Sept 1993.
  943.  
  944. [MIME2]         N. Borenstein & N. Freed: "Multipurpose Internet Mail
  945.                 Extensions (MIME) Part Two: Media Types".
  946.                 draft-ietf-draft-ietf-822ext-mime-imt-02.txt, December
  947.                 1995.
  948.  
  949. [NEWS]          M.R. Horton, R. Adams: "Standard for interchange of
  950.                 USENET messages", RFC 1036, December 1987.
  951.  
  952. [PDF]           Bienz, T., Cohn, R. and Meehan, J.: "Portable Document
  953.                 Format Reference Manual, Version 1.1", Adboe Systems
  954.                 Inc.
  955.  
  956. [REL]           Edward Levinson: "The MIME Multipart/Related Content-
  957.                 Type", <draft-ietf-mhtml-related-00.txt>, May 1995.
  958.  
  959. [RELURL]        R. Fielding: "Relative Uniform Resource Locators", RFC
  960.                 1808, June 1995.
  961.  
  962. [RFC822]        D. Crocker: "Standard for the format of ARPA Internet
  963.                 text messages." STD 11, RFC 822, August 1982.
  964.  
  965. [SGML]          ISO 8879. Information Processing -- Text and Office  -
  966.                 Standard Generalized Markup Language (SGML),
  967.                 1986. <URL:http://www.iso.ch/cate/d16387.html>
  968.  
  969. [SMTP]          J. Postel: "Simple Mail Transfer Protocol", STD 10, RFC
  970.                 821, August 1982.
  971.  
  972. [URL]           T. Berners-Lee, L. Masinter, M. McCahill: "Uniform
  973.                 Resource Locators (URL)", RFC 1738, December 1994.
  974.  
  975. [URLBODY]       N. Freed and Keith Moore: "Definition of the URL MIME
  976.                 External-Body Access-Type",
  977.                 draft-ietf-mailext-acc-url-01.txt, November 1995.
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985. draft-ietf-mhtml-spec-05.txt                            November 1996
  986. Palme-Hopmann      Do not implement based on this draft      [Page 17]
  987.  
  988. 15. Author's Address
  989.  
  990. For contacting the editors, preferably write to Jacob Palme rather than
  991. Alex Hopmann.
  992.  
  993. Jacob Palme                          Phone: +46-8-16 16 67
  994. Stockholm University and KTH         Fax: +46-8-783 08 29
  995. Electrum 230                         E-mail: jpalme@dsv.su.se
  996. S-164 40 Kista, Sweden
  997.  
  998. Alex Hopmann
  999. President
  1000. ResNova Software, Inc.               E-mail: alex.hopmann@resnova.com
  1001. 5011 Argosy Dr. #13
  1002. Huntington Beach, CA 92649
  1003.  
  1004. Working group chairman:
  1005.  
  1006. Einar Stefferud <stef@nma.com>
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043. draft-ietf-mhtml-spec-05.txt                            November 1996
  1044.