draft-ietf-mhtml-rev-01.txt   draft-ietf-mhtml-rev-02.txt 
Network Working Group Jacob Palme Network Working Group Jacob Palme
Internet Draft Stockholm University/KTH Internet Draft Stockholm University/KTH
draft-ietf-mhtml-rev-01.txt Alexander Hopmann draft-ietf-mhtml-rev-02.txt Alexander Hopmann
IETF status to be: Proposed standard Microsoft Corporation IETF status to be: Proposed standard Microsoft Corporation
Revises: RFC 2110 Revises: RFC 2110
Expires: March 1998 September 1997 Expires: March 1998 October 1997
MIME E-mail Encapsulation of Aggregate Documents, such as HTML (MHTML) MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)
Status of this Document Status of this Document
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, and documents of the Internet Engineering Task Force (IETF), its areas, and
its working groups. Note that other groups may also distribute working its working groups. Note that other groups may also distribute working
documents as Internet-Drafts. documents as Internet-Drafts.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference material time. It is inappropriate to use Internet-Drafts as reference material
or to cite them other than as ``work in progress.'' or to cite them other than as "work in progress."
To learn the current status of any Internet-Draft, please check the To learn the current status of any Internet-Draft, please check the
``1id-abstracts.txt'' listing contained in the Internet-Drafts Shadow "1id-abstracts.txt" listing contained in the Internet-Drafts Shadow
Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe), Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
ftp.isi.edu (US West Coast). ftp.isi.edu (US West Coast).
Abstract Abstract
Although HTML [RFC 1866] was designed within the context of MIME, Although HTML [RFC 1866] was designed within the context of MIME,
more than the specification of HTML as defined in RFC 1866 is needed more than the specification of HTML as defined in RFC 1866 is needed
for two electronic mail user agents to be able to interoperate using for two electronic mail user agents to be able to interoperate using
HTML as a document format. These issues include the naming of HTML as a document format. These issues include the naming of
objects that are normally referred to by URIs, and the means of objects that are normally referred to by URIs, and the means of
aggregating objects that go together. This document describes a set aggregating objects that go together. This document describes a set
of guidelines that will allow conforming mail user agents to be able of guidelines that will allow conforming mail user agents to be able
to send, deliver and display these objects, such as HTML objects, to send, deliver and display these objects, such as HTML objects,
that can contain links represented by URIs. In order to be able to that can contain links represented by URIs. In order to be able to
handle inter-linked objects, the document uses the MIME type handle inter-linked objects, the document uses the MIME type
'multipart/related' and specifies the MIME content-headers ''multipart/related'' and specifies the MIME content-headers
'Content-Location' and 'Content-Base'. ''Content-Location'' and ''Content-Base''. The guidelines in this
document can also be used when sending aggregate HTML objects in
other forms than e-mail, such as through HTTP or FTP.
Differences compared to the previous version of this proposed Differences compared to the previous version of this proposed
standard, published in RFC 2110, are summarized in chapter 13. standard, published in RFC 2110, are summarized in chapter 13.
Table of Contents Table of Contents
1. Introduction 1. Introduction
2. Terminology 2. Terminology
2.1 Conformance requirement terminology 2.1 Conformance requirement terminology
2.2 Other terminology 2.2 Other terminology
skipping to change at line 63 skipping to change at line 65
4. The Content-Location and Content-Base MIME Content Headers 4. The Content-Location and Content-Base MIME Content Headers
4.1 MIME content headers 4.1 MIME content headers
4.2 The Content-Location Header 4.2 The Content-Location Header
4.3 The Content-Base header 4.3 The Content-Base header
4.4 Encoding of URIs in MIME headers 4.4 Encoding of URIs in MIME headers
5. Base URIs for resolution of relative URIs 5. Base URIs for resolution of relative URIs
6. Sending documents without linked objects 6. Sending documents without linked objects
7. Use of the Content-Type: "multipart/related" 7. Use of the Content-Type: "multipart/related"
8. Usage of Links to Other Body Parts 8. Usage of Links to Other Body Parts
8.1 General principle 8.1 General principle
8.2 Resolution of hyperlinks in text/HTML body parts 8.2 Resolution of hyperlinks in text/html body parts
8.3 Use of the Content-ID header and CID URLs 8.3 Use of the Content-ID header and CID URLs
8.4 Conformance requirement on receipt 8.4 Conformance requirement on receipt
9. Examples 9. Examples
9.1 Example of a HTML body without included linked objects 9.1 Example of a HTML body without included linked objects
9.2 Example with absolute URIs to an embedded GIF picture 9.2 Example with absolute URIs to an embedded GIF picture
9.3 Example with relative URIs to an embedded GIF picture 9.3 Example with relative URIs to an embedded GIF picture
9.4 Example with relative URIs and no BASE available 9.4 Example with relative URIs and no BASE available
9.5 Example using a BASE on the Multipart 9.5 Example using a BASE on the Multipart
9.6 Example using CID URL and Content-ID header to an embedded GIF 9.6 Example using CID URL and Content-ID header to an embedded GIF
picture picture
10. Content-Disposition header 10. Content-Disposition header
11. Character encoding issues and end-of-line issues 11. Character encoding issues and end-of-line issues
12. Security Considerations 12. Security Considerations
13. Differences as compared to the previous version of this proposed 13. Differences as compared to the previous version of this proposed
standard in RFC 2110 standard in RFC 2110
14. Acknowledgments 14. Copyright
15. References 15. Acknowledgments
16. Author's Addresses 16. References
17. Author's Addresses
Mailing List Information Mailing List Information
To write contributions To write contributions
Further discussion on this document should be done through the Further discussion on this document should be done through the
mailing list MHTML@SEGATE.SUNET.SE. mailing list MHTML@SEGATE.SUNET.SE.
Comments on less important details may also be sent to the editor, Comments on less important details may also be sent to the editor,
Jacob Palme <jpalme@dsv.su.se>. Jacob Palme <jpalme@dsv.su.se>.
To subscribe To subscribe
To subscribe to this list, send a message to To subscribe to this list, send a message to
LISTSERV@SEGATE.SUNET.SE LISTSERV@SEGATE.SUNET.SE
which contains the text which contains the text
SUB MHTML <your name (not your e-mail address)> SUB MHTML <your name (not your email address)>
To unsubscribe To unsubscribe
To unsubscribe to this list, send a message to To unsubscribe to this list, send a message to
LISTSERV@SEGATE.SUNET.SE LISTSERV@SEGATE.SUNET.SE
which contains the text which contains the text
UNS MHTML UNS MHTML
To access mailing list archives To access mailing list archives
skipping to change at line 121 skipping to change at line 124
FTP://SEGATE.SUNET.SE/lists/mhtml/ FTP://SEGATE.SUNET.SE/lists/mhtml/
The archives are available for browsing from The archives are available for browsing from
HTTP://segate.sunet.se/archives/mhtml.html HTTP://segate.sunet.se/archives/mhtml.html
and in searchable format from and in searchable format from
http://www.reference.com/cgi-bin/pn/ http://www.reference.com/cgi-bin/pn/
listarch?list=MHTML@segate.sunet.se listarch?list=MHTML@segate.sunet.se
Finally, the archives are available by e-mail. Send a message to Finally, the archives are available by email. Send a message to
LISTSERV@SEGATE.SUNET.SE with the text "INDEX MHTML" to get a list LISTSERV@SEGATE.SUNET.SE with the text "INDEX MHTML" to get a list
of the archive files, and then a new message "GET <file name>" to of the archive files, and then a new message "GET <file name>" to
retrieve the archive files. retrieve the archive files.
More information More information
Information about the IETF work in developing this standard may Information about the IETF work in developing this standard may
also be available at URL: also be available at URL:
HTTP://www.dsv.su.se/~jpalme/ietf/mhtml.html http://www.dsv.su.se/~jpalme/ietf/mhtml.html
It is the intention to set up a collection of test messages at the A collection of test messages is available at
above URL, but no such test collection exists when this is written http://www.dsv.su.se/~jpalme/mimetest/MHTML-test-messages.html
(August 1997).
1. Introduction 1. Introduction
There are a number of document formats, Hypertext Markup Language There are a number of document formats, Hypertext Markup Language
[HTML2], Portable Document format [PDF] and Virtual Reality Markup [HTML2], Portable Document format [PDF] and Virtual Reality Markup
Language [VRML] for example, which provide links using URIs for their Language [VRML] for example, which provide links using URIs for their
resolution. There is an obvious need to be able to send documents in resolution. There is an obvious need to be able to send documents in
these formats in e-mail [SMTP], [RFC822]. This document gives these formats in email [SMTP], [RFC822]. This document gives additional
additional specifications on how to send such documents in MIME [MIME1 specifications on how to send such documents in MIME-formatted [MIME1
to MIME5] e-mail messages. This version of this standard was based on to MIME5] messages. This version of this standard was based on full
full consideration only of the needs for objects with links in the consideration only of the needs for objects with links in the text/html
Text/HTML media type (as defined in [HTML2]), but the standard may media type (as defined in [HTML2]), but the standard may still be
still be applicable also to other formats for sets of interlinked applicable also to other formats for sets of interlinked objects,
objects, linked by URIs. There is no conformance requirement that linked by URIs. There is no conformance requirement that
implementations claiming conformance to this standard are able to implementations claiming conformance to this standard are able to
handle URI-s in other document formats than HTML. handle URI-s in other document formats than HTML.
URIs in documents in HTML and other similar formats reference other URIs in documents in HTML and other similar formats reference other
objects and resources, either embedded or directly accessible through objects and resources, either embedded or directly accessible through
hypertext links. When mailing such a document, it is often desirable to hypertext links. When mailing such a document, it is often desirable to
also mail all of the additional resources that are referenced in it; also mail all of the additional resources that are referenced in it;
those elements are necessary for the complete interpretation of the those elements are necessary for the complete interpretation of the
primary object. primary object. Also with other protocols such as HTTP or FTP, it can
sometimes be desirable to send several documents in one aggregate
document.
An alternative way for sending an HTML document or other object An alternative way for sending an HTML document or other object
containing URIs in e-mail is to only send the URL, and let the containing URIs in email is to only send the URI, and let the recipient
recipient look up the document using HTTP. That method is described in look up the document using HTTP. That method is described in [URLBODY]
[URLBODY] and is not described in this document. and is not described in this document.
An informational RFC will be published as a supplement to this An informational RFC will be published as a supplement to this
standard. The informational RFC will discuss implementation methods and standard. The informational RFC will discuss implementation methods and
some implementation problems. Implementors are recommended to read this some implementation problems. Implementors are recommended to read this
informational RFC when developing implementations of the MHTML informational RFC when developing implementations of the MHTML
standard. This informational RFC is, when this RFC is published, still standard. This informational RFC is, when this RFC is published, still
in IETF draft status. in IETF draft status.
2. Terminology 2. Terminology
2.1 Conformance requirement terminology 2.1 Conformance requirement terminology
This specification uses the same words as the Requirement for Internet The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
Hosts [HOSTS] for defining the significance of each particular "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
requirement. These words are: document are to be interpreted as described in [IETF-TERMS].
MUST This word or the adjective "required" means that the item is
an absolute requirement of the specification.
SHOULD This word or the adjective "recommended" means that there may
exist valid reasons in particular circumstances to ignore this
item, but the full implications should be understood and the
case carefully weighed before choosing a different course.
MAY This word or the adjective "optional" means that this item is
truly optional. One vendor may choose to include the item
because a particular marketplace requires it or because it
enhances the product, for example; another vendor may omit the
same item.
An implementation is not compliant if it fails to satisfy one or more An implementation is not compliant if it fails to satisfy one or more
of the MUST requirements for the protocols it implements. An of the MUST requirements for the protocols it implements. An
implementation that satisfies all the MUST and all the SHOULD implementation that satisfies all the MUST and all the SHOULD
requirements for its protocols is said to be "unconditionally requirements for its protocols is said to be "unconditionally
compliant"; one that satisfies all the MUST requirements but not all compliant"; one that satisfies all the MUST requirements but not all
the SHOULD requirements for its protocols is said to be "conditionally the SHOULD requirements for its protocols is said to be "conditionally
compliant." compliant."
2.2 Other terminology 2.2 Other terminology
skipping to change at line 282 skipping to change at line 272
An aggregate document is a MIME-encoded message that contains a root An aggregate document is a MIME-encoded message that contains a root
document as well as other data that is required in order to represent document as well as other data that is required in order to represent
that document (inline pictures, style sheets, applets, etc.). Aggregate that document (inline pictures, style sheets, applets, etc.). Aggregate
documents can also include additional elements that are linked to the documents can also include additional elements that are linked to the
first object. It is important to keep in mind the differing needs of first object. It is important to keep in mind the differing needs of
several audiences. Mail sending agents might send aggregate documents several audiences. Mail sending agents might send aggregate documents
as an encoding of normal day-to-day electronic mail. Mail sending as an encoding of normal day-to-day electronic mail. Mail sending
agents might also send aggregate documents when a user wishes to mail a agents might also send aggregate documents when a user wishes to mail a
particular document from the web to someone else. Finally mail sending particular document from the web to someone else. Finally mail sending
agents might send aggregate documents as automatic responders, agents might send aggregate documents as automatic responders,
providing access to WWW resources for non-IP connected clients. providing access to WWW resources for non-IP connected clients. Also
with other protocols such as HTTP or FTP, there may sometimes be a need
to send aggregate documents in MIME multipart format.
Mail receiving agents also have several differing needs. Some mail Receiving agents also have several differing needs. Some receiving
receiving agents might be able to receive an aggregate document and agents might be able to receive an aggregate document and display it
display it just as any other text content type would be displayed. just as any other text content type would be displayed. Others might
Others might have to pass this aggregate document to a browsing have to pass this aggregate document to a browsing program, and
program, and provisions need to be made to make this possible. provisions need to be made to make this possible.
Finally several other constraints on the problem arise. It is important Finally several other constraints on the problem arise. It is important
that it be possible for a document to be signed and for it to be able that it be possible for a document to be signed and for it to be able
to be transmitted to a client and displayed with a minimum risk of to be transmitted to a client and displayed with a minimum risk of
breaking the message integrity (MIC) check that is part of the breaking the message integrity (MIC) check that is part of the
signature. signature.
4. The Content-Location and Content-Base MIME Content Headers 4. The Content-Location and Content-Base MIME Content Headers
4.1 MIME content headers 4.1 MIME content headers
skipping to change at line 326 skipping to change at line 318
is anticipated that other forms of URIs will in the future be used. is anticipated that other forms of URIs will in the future be used.
The syntax for these headers is, using the syntax definition tools from The syntax for these headers is, using the syntax definition tools from
[RFC822]: [RFC822]:
content-location = "Content-Location:" content-location = "Content-Location:"
( absoluteURI | relativeURI ) ( absoluteURI | relativeURI )
content-base = "Content-Base:" absoluteURI content-base = "Content-Base:" absoluteURI
where URI is at present (June 1996) restricted to the syntax for URLs where URI is restricted to the syntax for URLs as defined in Unform
as defined in Unform Resource Locators [URL]. Resource Locators [URL] until IETF specifies other kinds of URIs.
4.2 The Content-Location Header 4.2 The Content-Location Header
The Content-Location header specifies the URI that corresponds to the The Content-Location header specifies the URI that corresponds to the
content of the body part in whose heading the header is placed. Its content of the body part in whose heading the header is placed. Its
value CAN be an absolute or relative URI. Any URI or URL scheme may be value CAN be an absolute or relative URI. Any URI or URL scheme may be
used, but use of non-standardized URI or URL schemes might entail some used, but use of non-standardized URI or URL schemes might entail some
risk that recipients cannot handle them correctly. risk that recipients cannot handle them correctly.
The Content-Location header can be used to indicate that the data sent The Content-Location header can be used to indicate that the data sent
skipping to change at line 367 skipping to change at line 359
content-heading, and its value is a single URI. Note however, that both content-heading, and its value is a single URI. Note however, that both
one Content-Location and one Content-ID or Message-ID header are one Content-Location and one Content-ID or Message-ID header are
allowed. In such a case, these will indicate two different, equally allowed. In such a case, these will indicate two different, equally
valid references for this body part, and any of them may be used in valid references for this body part, and any of them may be used in
other body parts within one "multipart/related" to refer to this body other body parts within one "multipart/related" to refer to this body
part. part.
Example: Example:
Content-Type: "multipart/related"; boundary="boundary-example-1"; Content-Type: "multipart/related"; boundary="boundary-example-1";
type="Text/HTML" type="text/html"
--boundary-example-1 --boundary-example-1
Part 1: Part 1:
Content-Type: Text/HTML; charset=US-ASCII Content-Type: text/html; charset=US-ASCII
... ... <IMG SRC="fiction1/fiction2"> ... ... ... ... <IMG SRC="fiction1/fiction2"> ... ...
--boundary-example-1 --boundary-example-1
Part 2: Part 2:
Content-Type: Text/HTML; charset=US-ASCII Content-Type: text/html; charset=US-ASCII
Content-Location: fiction1/fiction2 Content-Location: fiction1/fiction2
--boundary-example-1-- --boundary-example-1--
4.3 The Content-Base header 4.3 The Content-Base header
The Content-Base gives a base for relative URIs occurring in other The Content-Base gives a base for relative URIs occurring in other
fields in the same content heading and in the body text covered by this fields in the same content heading and in its content, if the text is a
content heading, if the text is a HTML documents which does not have HTML document which does not have any BASE element in its HTML code.
any BASE element in its HTML code. Its value MUST be an absolute URI. Its value MUST be an absolute URI.
The full text of the Content-Base header is used as a base, even if it
does not end in a "/". Thus: "Content-Base: http://foo.bar/" and
"Content-Base: http://foo.bar" are identical.
Example showing which Content-Base is valid where: Example showing which Content-Base is valid where:
Content-Type: "multipart/related"; boundary="boundary-example-1"; Content-Type: "multipart/related"; boundary="boundary-example-1";
type="Text/HTML"; start=<foo2*foo3@bar2.net> type="text/html"; start=<foo2*foo3@bar2.net>
; A Content-Base header is allowed here, and can be used ; A Content-Base header is allowed here, and can be used
; for resolution of relative URL-s in Part 1 and Part 2, ; for resolution of relative URL-s in Part 1 and Part 2,
; if these did not have any absolute base of their own. ; if these did not have any absolute base of their own.
; However, both part 1 and part 2 below have an absolute ; However, both part 1 and part 2 below have an absolute
; base, in part 1 through an absolute Content-Location header, ; base, in part 1 through an absolute Content-Location header,
; in part 2 through a Content-Base header, and thus a Content- ; in part 2 through a Content-Base header, and thus a Content-
; base up here would not be used for resoultion of relative ; base up here would not be used for resoultion of relative
; URLs within the body parts 1 and 2. ; URLs within the body parts 1 and 2.
--boundary-example-1 --boundary-example-1
Part 1: Part 1:
Content-Type: Text/HTML; charset=US-ASCII Content-Type: text/html; charset=US-ASCII
Content-ID: <foo2*foo3@bar2.net> Content-ID: <foo2*foo3@bar2.net>
Content-Location: http://www.ietf.cnri.reston.va.us/foo1.bar1 Content-Location: http://www.ietf.cnri.reston.va.us/foo1.bar1
; Since this Content-Location contains an absolute URL, it ; Since this Content-Location contains an absolute URL, it
; does not need to be resolved using any Content-Base header. ; does not need to be resolved using any Content-Base header.
; A combination of a Content-Location with a relative URL ; A combination of a Content-Location with a relative URL
; and a Content-Base with an absolute URL would also be valid, ; and a Content-Base with an absolute URL would also be valid,
; as well as only a Content-Location with a relative URL ; as well as only a Content-Location with a relative URL
; and resolved through the Content-Base in the surrounding ; and resolved through the Content-Base in the surrounding
; multipart heading. ; multipart heading.
<FRAME NAME=topwindow src="/frames/foo2.bar2"> <FRAME NAME=topwindow src="/frames/foo2.bar2">
--boundary-example-1 --boundary-example-1
Part 2: Part 2:
Content-Type: Text/HTML; charset=US-ASCII Content-Type: text/html; charset=US-ASCII
Content-ID: <foo4*foo5@bar2.net> Content-ID: <foo4*foo5@bar2.net>
Content-Location: foo2.bar2 ; The Content-Base below applies to Content-Location: foo2.bar2 ; The Content-Base below applies to
; this relative URI ; this relative URI
Content-Base: http://www.ietf.cnri.reston.va.us/frames/ Content-Base: http://www.ietf.cnri.reston.va.us/frames/
<A HREF="http://www.ietf.cnri.reston.va.us/foo1.bar1"> <A HREF="http://www.ietf.cnri.reston.va.us/foo1.bar1">
To top window </A> To top window </A>
--boundary-example-1-- --boundary-example-1--
4.4 Encoding of URIs in MIME headers 4.4 Encoding of URIs in MIME headers
4.4.1 Handling of URIs containing inappropriate characters 4.4.1 Handling of URIs containing inappropriate characters
Some documents may contain URIs with characters that are inappropriate Some documents may contain URIs with characters that are inappropriate
for an RFC 822 header, either because the URI itself has an incorrect for an RFC 822 header, either because the URI itself has an incorrect
syntax according to [URL] or the URI syntax standard has been changed syntax according to [URL] or the URI syntax standard has been changed
to allow characters not previously allowed in MIME headers. These URIs to allow characters not previously allowed in MIME headers. These URIs
cannot be sent directly in a mail header. There are two approaches that cannot be sent directly in a message header. There are two approaches
can be taken when encountering such a URI as the text to be placed in a that can be taken when encountering such a URI as the text to be placed
Content-Location or Content-Base header: in a Content-Location or Content-Base header:
a) In some situations, an implementation might be able to replace the a) In some situations, an implementation might be able to replace the
URL with one that can be sent directly. This might be accomplished, for URI with one that can be sent directly. This might be accomplished, for
example, by using the encoding method of [URL] to replace inappropriate example, by using the encoding method of [URL] to replace inappropriate
characters within the URL with ones encoded using the %nn encoding. characters within the URI with ones encoded using the "%nn" encoding.
This replacement MUST in that case be done both in the header and in This replacement MUST in that case be done both in the header and in
the HTML text which has a hyperlink which is to match the header. Since the HTML text which has a hyperlink which is to match the header. Since
the change is done in both places, a receiving mailer need not decode the change is done in both places, a receiving agent need not decode
it, and MUST NOT decode [URL]-encoding before matching hyperlinks to it, and MUST NOT decode [URL]-encoding before matching hyperlinks to
body parts. body parts.
b) The URL might be encoded using the method described in [MIME3]. This b) The URI might be encoded using the method described in [MIME3]. This
replacement MUST only be done in the header, not in the HTML text. replacement MUST only be done in the header, not in the HTML text.
Receiving clients must decode the [MIME3] encoding in the heading Receiving clients must decode the [MIME3] encoding in the heading
before comparing hyperlinks in body text to URLs in Content-Location before comparing hyperlinks in body text to URIs in Content-Location
headers. headers.
With method (b), the charset parameter value "US-ASCII" SHOULD be used With method (b), the charset parameter value "US-ASCII" SHOULD be used
if the URL contains no octets outside of the 7-bit range. If such if the URI contains no octets outside of the 7-bit range. If such
octets are present, the correct charset parameter value (derived e.g. octets are present, the correct charset parameter value (derived e.g.
from information about the HTML document the URL was found in) SHOULD from information about the HTML document the URI was found in) SHOULD
be used. If this cannot be safely established, the value "UKNOWN-8BIT" be used. If this cannot be safely established, the value "UKNOWN-8BIT"
[RFC 1428] MUST be used. [RFC 1428] MUST be used.
Note that for the MHTML processing of (matching URLs in body text to Note that for the MHTML processing of matching URIs in body text to URI
URL in) Content-Location headers the value of the charset parameter is in Content-Location headers the value of the charset parameter is
irrelevant, but it may be relevant for other purposes, and incorrect irrelevant, but it may be relevant for other purposes, and incorrect
labeling MUST therefore be avoided. labeling MUST therefore be avoided. Warning: Irrelevance of the charset
parameter may not be true in the future, if different character
encodings of the same non-English filename is used in HTML.
Caution should be taken in using method (a), since, in general, this Caution should be taken in using method (a), since, in general, this
encoding can not be applied safely to characters that are used for encoding can not be applied safely to characters that are used for
reserved purposes within the URL scheme. In addition, changing the HTML reserved purposes within the URI scheme. In addition, changing the HTML
body which contains the URL might invalidate a message integrity check. body which contains the URI might invalidate a message integrity check.
Because of these problems, this method SHOULD only be used if it is Because of these problems, this method SHOULD only be used if it is
performed in cooperation with the author/owner of the documents performed in cooperation with the author/owner of the documents
involved. involved.
4.4.2 Folding of long URIs 4.4.2 Folding of long URIs
Since MIME header fields have a limited length and URIs can get quite Since MIME header fields have a limited length and URIs can get quite
long, these lines may have to be folded. long, these lines may have to be folded.
Encoding as discussed in clause 4.4.1 must be done before such folding. Encoding as discussed in clause 4.4.1 MUST be done before such folding.
After that, the folding can be done, using the algorithm defined in This MUST include encoding of space characters, if any. After that, the
[URLBODY] section 3.1. folding can be done, using the algorithm defined in [URLBODY] section
3.1.
5. Base URIs for resolution of relative URIs 5. Base URIs for resolution of relative URIs
Relative URIs inside contents of MIME body parts are resolved relative Relative URIs inside contents of MIME body parts are resolved relative
to a base URI using the methods for resolving relative URIs described to a base URI using the methods for resolving relative URIs described
in [RELURL]. In order to determine this base URI, the first-applicable in [RELURL]. In order to determine this base URI, the first-applicable
method in the following list applies. method in the following list applies.
(a) There is a base specification inside the MIME body part containing (a) There is a base specification inside the MIME body part containing
the link which resolves relative URIs into absolute URIs. For the link which resolves relative URIs into absolute URIs. For
skipping to change at line 521 skipping to change at line 513
then serve as the base in the same way as the requested URI can then serve as the base in the same way as the requested URI can
serve as a base for relative URIs within a file retrieved via HTTP serve as a base for relative URIs within a file retrieved via HTTP
[HTTP]. [HTTP].
(d) Step (b) and (c) can be repeated recursively on Content-Base and (d) Step (b) and (c) can be repeated recursively on Content-Base and
Content-Location headers in surrounding multi-part headings. Content-Location headers in surrounding multi-part headings.
However, a base from an absolute Content-Location in an inner However, a base from an absolute Content-Location in an inner
heading takes precedence over a base from a Content-Base or a heading takes precedence over a base from a Content-Base or a
Content-Location in a surrounding heading. Content-Location in a surrounding heading.
When the methods above do not yield an absolute URI matching of two When the methods above do not yield an absolute URI, matching of two
relative URIs against each other can still be done for matches within a relative URIs against each other can still be done for matches within a
multipart/related. This matching is done as if they had been given as multipart/related. This matching is done as if they had been given as
base an imaginary URL "This_message:/", which exists for the sole base an imaginary URL "this_message:/", which exists for the sole
purpose of resolving relative references within a multipart entitity. purpose of resolving relative references within a multipart/related
entitity.
This is also described in other words in section 8.2 below. This is also described in other words in section 8.2 below.
6. Sending documents without linked objects 6. Sending documents without linked objects
If a document, such as an HTML object, is sent without other objects, If a document, such as an HTML object, is sent without other objects,
to which it is linked, it MAY be sent as a Text/HTML body part by to which it is linked, it MAY be sent as a text/html body part by
itself. In this case, "multipart/related" need not be used. itself. In this case, "multipart/related" need not be used.
Such a document may either not include any links, or contain links Such a document may either not include any links, or contain links
which the recipient resolves via ordinary net look up, or contain links which the recipient resolves via ordinary net look up, or contain links
which the recipient cannot resolve. which the recipient cannot resolve.
Inclusion of links which the recipient has to look up through the net Inclusion of links which the recipient has to look up through the net
may not work for some recipients, since all e-mail recipients do not may not work for some recipients, since all email recipients do not
have full internet connectivity. Also, such links may work for the have full internet connectivity. Also, such links may work for the
sender but not for the recipient, for example when the link refers to sender but not for the recipient, for example when the link refers to
an URI within a company-internal network not accessible from outside an URI within a company-internal network not accessible from outside
the company. the company.
Note that documents with links that the recipient cannot resolve MAY be Note that documents with links that the recipient cannot resolve MAY be
sent, although this is discouraged. For example, two persons developing sent, although this is discouraged. For example, two persons developing
a new HTML page may exchange incomplete versions. a new HTML page may exchange incomplete versions.
7. Use of the Content-Type: "multipart/related" 7. Use of the Content-Type: "multipart/related"
skipping to change at line 569 skipping to change at line 562
multipart/related, this standard only covers their use for resolution multipart/related, this standard only covers their use for resolution
of links between body parts inside one multipart/related. This standard of links between body parts inside one multipart/related. This standard
does not cover links from one multipart/related to another does not cover links from one multipart/related to another
multipart/related in a message containing multiple multipart/related multipart/related in a message containing multiple multipart/related
objects. objects.
The root body part of the "multipart/related" SHOULD be the start The root body part of the "multipart/related" SHOULD be the start
object for rendering the object, such as a text/html object, and which object for rendering the object, such as a text/html object, and which
contains links to objects in other body parts, or a contains links to objects in other body parts, or a
multipart/alternative of which at least one alternative resolves to multipart/alternative of which at least one alternative resolves to
such a start object. Implementors are warned, however, that some mail such a start object. Implementors are warned, however, that some
programs treat multipart/alternative as if it had been multipart/mixed receiving agents treat multipart/alternative as if it had been
(even though MIME [MIME1] requires support for multipart/alternative). multipart/mixed (even though MIME [MIME1] requires support for
multipart/alternative).
[REL] specifies that the type attribute is mandatory in Content-Type: [REL] specifies that the type attribute is mandatory in Content-Type:
"multipart/related" headers, and requires that this attribute be the "multipart/related" headers, and requires that this attribute be the
type of the root object, and this value shall thus for example be type of the root object, and this value shall thus for example be
"multipart/alternative", if the root part is of Content-type "multipart/alternative", if the root part is of Content-type
"multipart/alternative", even if one of the subparts of the "multipart/alternative", even if one of the subparts of the
"multipart/alternative" is of type "text/html". If the root is not the "multipart/alternative" is of type "text/html". If the root is not the
first body part within the "multipart/related", [REL] further requires first body part within the "multipart/related", [REL] further requires
that its Content-ID MUST be given in a start parameter to the that its Content-ID MUST be given in a start parameter to the
"Content-Type: "multipart/related" header. "Content-Type: "multipart/related" header.
When presenting the root body part to the user, the additional body When presenting the root body part to the user, the additional body
parts within the "multipart/related" can be used: parts within the "multipart/related" can be used:
(a) For those recipients who only have e-mail but not full Internet (a) For those recipients who only have email but not full Internet
access. access.
(b) For those recipients who for other reasons, such as firewalls or (b) For those recipients who for other reasons, such as firewalls or
the use of company-internal links, cannot retrieve the linked body the use of company-internal links, cannot retrieve the linked body
parts through the net. parts through the net.
Note that this means that you can, via e-mail, send HTML which Note that this means that you can, via email, send HTML which
includes URIs which the recipient cannot resolve via HTTPor other includes URIs which the recipient cannot resolve via HTTPor other
connectivity-requiring URIs. connectivity-requiring URIs.
(c) To send a document in a format which is preserved even if the (c) To send a document in a format which is preserved even if the
object to which the hyperlinks refer through HTTP is later changed object to which the hyperlinks refer through HTTP is later changed
or deleted. or deleted.
(d) For items which are not available on the web. (d) For items which are not available on the web.
(e) For any recipient to speed up access. (e) For any recipient to speed up access.
The type parameter of the "Content-Type: "multipart/related" MUST be The type parameter of the "Content-Type: "multipart/related" MUST be
the same as the Content-Type of its root. the same as the Content-Type of its root.
When a sending MUA sends objects which were retrieved from the WWW, it When a sending MUA sends objects which were retrieved from the WWW, it
SHOULD maintain their WWW URIs. It SHOULD not transform these URIs into SHOULD maintain their WWW URIs. It SHOULD not transform these URIs into
some other URI form prior to transmitting them. This will allow the some other URI form prior to transmitting them. This will allow the
receiving MUA to both verify MICs included with the email message, as receiving MUA to both verify MICs included with the message, as well as
well as verify the documents against their WWW counterpoints. verify the documents against their WWW counterpoints.
In certain special cases this will not work if the original HTML In certain special cases this will not work if the original HTML
document contains URIs as parameters to objects and applets. In such a document contains URIs as parameters to objects and applets. In such a
case, it might be better to rewrite the document before sending it. case, it might be better to rewrite the document before sending it.
This problem is discussed in more detail in the informational RFC which This problem is discussed in more detail in the informational RFC which
will be published as a supplement to this standard. will be published as a supplement to this standard.
This standard does not cover the case where a "multipart/related" This standard does not cover the case where a "multipart/related"
contains links to MIME body parts outside of the current contains links to MIME body parts outside of the current
"multipart/related" or in other MIME messages, even if methods similar "multipart/related" or in other MIME messages, even if methods similar
to those described in this standard are used. Implementors who provide to those described in this standard are used. Implementors who provide
such links are warned that mailers implementing this standard may not such links are warned that receiving agents implementing this standard
be able to resolve such links. may not be able to resolve such links.
Within a "multipart/related", ALL different parts MUST have different Within a "multipart/related", ALL different parts MUST have different
Content-ID values or Content-Location headers which resolve to Content-ID values or Content-Location headers which resolve to
different URLs. different URIs.
Two body parts in the same multipart/related can have the same relative Two body parts in the same multipart/related can have the same relative
URI as value of their Content-Location headers only if there are URI as value of their Content-Location headers only if there are
headers contain a different Content-Base header, so that the absolute headers containing a different Content-Base header, so that the
URI after resolution against the Content-Base header is different. absolute URI after resolution against the Content-Base header is
different.
8. Usage of Links to Other Body Parts 8. Usage of Links to Other Body Parts
8.1 General principle 8.1 General principle
A body part, such as a text/HTML body part, may contain hyperlinks to A body part, such as a text/html body part, may contain hyperlinks
objects which are included as other body parts in the same message and to objects which are included as other body parts in the same message
within the same "multipart/related" content. Often such linked objects and within the same "multipart/related" content. Often such linked
are meant to be displayed inline to the reader of the main document; objects are meant to be displayed inline to the reader of the main
for example, objects referenced with the IMG tag in HTML 2.0 [HTML2]. document; for example, objects referenced with the src attribute
New tags with this property are proposed in the ongoing development of of the IMG element in HTML 2.0 [HTML2]. New elements and attributes
HTML (example: applet, frame). with this property are proposed in the ongoing development of HTML
(example: applet, frame, profile, OBJECT, classid, codebase, data,
SCRIPT). A sender might also want to send a set of HTML documents
which the reader can traverse, and which are related with the
attribute href of the A element.
In order to send such messages, there is a need to indicate which other In order to send such messages, there is a need to indicate which other
body parts are referred to by the links in the body parts containing body parts are referred to by the links in the body parts containing
such links. For example, a body part of Content-Type: Text/HTML often such links. For example, a body part of Content-Type: text/html often
has links to other objects, which might be included in other body parts has links to other objects, which might be included in other body parts
in the same MIME message. in the same MIME message.
8.2 Resolution of hyperlinks in text/HTML body parts 8.2 Resolution of hyperlinks in text/html body parts
The resolution of hyperlinks in text/HTML body parts is performed in The resolution of hyperlinks in text/html body parts is performed in
the following way: the following way:
(a) Unfold multipl-eline header values according to [URLBODY]. Do NOT (a) Unfold multiple line header values according to [URLBODY]. Do NOT
however translate character encodings of the kind described in [URL]. however translate character encodings of the kind described in
Example: Do not transform "a%2eb/c%20d" into "a/b/c d". [URL]. Example: Do not transform "a%2eb/c%20d" into "a/b/c d".
(b) Remove all MIME encodings, such as content-transfer encoding and (b) Remove all MIME encodings, such as content-transfer encoding and
header encodings as defined in MIME part 3 [MIME3] Do NOT however header encodings as defined in MIME part 3 [MIME3] Do NOT however
translate character encodings of the kind described in [URL]. Example: translate character encodings of the kind described in [URL].
Do not transform "a%2eb/c%20d" into "a/b/c d". Example: Do not transform "a%2eb/c%20d" into "a/b/c d".
(c) Try to resolve all relative URIs in the HTML content and in Content- (c) Try to resolve all relative URIs in the HTML content and in
Location headers using the procedure described in chapter 5 above. The Content-Location headers using the procedure described in chapter 5
result of this resolution can be an absolute URI, or a fictiuous above. The result of this resolution can be an absolute URI, or a
absolute URI with the base "This_message:/" as specified in chapter 5. fictiuous absolute URI with the base "this_message:/" as specified
in chapter 5.
(d) For each hyperlink in any HTML body, compare the value of the (d) For each hyperlink in any HTML body, compare the value of the
hyperlink after resolution as described in (a) and (b), with the URI hyperlink after resolution as described in (a) and (b), with the
derived from Content-ID and Content-Location headers for other body URI derived from Content-ID and Content-Location headers for other
parts within the same Multipart/related. If the strings are identical, body parts within the same Multipart/related. If the strings are
octet by octet, then this hyperlink is resolved by the body part with identical, octet by octet, then this hyperlink is resolved by the
the same URI. This comparison will only succeed if the two URIs are body part with the same URI. This comparison will only succeed if
identical. This means that if one of the two URIs to be compared was a the two URIs are identical. This means that if one of the two URIs
fictituous absolute URI with the base "This_message:/", the other must to be compared was a fictituous absolute URI with the base
also be such a fictituous absolute URI, and not resolvable to a real "this_message:/", the other must also be such a fictituous absolute
absolute URI. URI, and not resolvable to a real absolute URI.
(e) If (c) fails, try to resolve the hyperlink through ordinary (e) If (c) fails, try to resolve the hyperlink through ordinary
Internet lookup. Resolution of hyperlinks of the URL-types "mid" or Internet lookup. Resolution of hyperlinks of the URL-types "mid" or
"cid" to other content-parts, outside multipart/related, or in other "cid" to other content-parts, outside multipart/related, or in
separately sent messages, is not covered by this standard, and is thus other separately sent messages, is not covered by this standard,
neither encouraged nor forbidden. and is thus neither encouraged nor forbidden.
8.3 Use of the Content-ID header and CID URLs 8.3 Use of the Content-ID header and CID URLs
When CID (Content-ID) URLs as defined in [URL] and [MIDCID] are used When CID (Content-ID) URLs as defined in [URL] and [MIDCID] are used
for links between body parts, the Content-ID header MUST be used for links between body parts, the Content-ID header MUST be used
instead of the Content-Location header. Thus, even though the following instead of the Content-Location header. Thus, even though the following
two headers are identical in meaning, only the Content-ID variant MUST two headers are identical in meaning, only the Content-ID variant MUST
be used, and all "Content-Location: CID:" should be ignored. be used, and all "Content-Location: CID:" should be ignored.
Content-ID: <foo@bar.net> Content-ID: <foo@bar.net>
Content-Location: CID: foo@bar.net Content-Location: CID: foo@bar.net
Note: Content-IDs MUST be globally unique [MIME1]. It is thus not Note: Content-IDs MUST be globally unique [MIME1]. It is thus not
permitted to make them unique only within this message or within this permitted to make them unique only within this message or within this
"multipart/related". "multipart/related".
8.4 Conformance requirement on receipt 8.4 Conformance requirement on receipt
An e-mail system which claims conformance to this standard MUST support An email system which claims conformance to this standard MUST support
receipt of "multipart/related" (as defined in section 7) with links receipt of "multipart/related" (as defined in section 7) with links
between body parts using both the Content-Location (as defined in between body parts using both the Content-Location (as defined in
section 8.2) and the Content-ID method (as defined in section 8.3). section 8.2) and the Content-ID method (as defined in section 8.3).
9. Examples 9. Examples
Warning: If there is a contradiction between the explanatory text and Warning: If there is a contradiction between the explanatory text and
the examples in this standard, then the explanatory text, not the the examples in this standard, then the explanatory text, not the
examples are normative. examples are normative.
skipping to change at line 731 skipping to change at line 731
is not an aggregate HTML object, but simply a message with a single is not an aggregate HTML object, but simply a message with a single
HTML body part. This message contains a hyperlink but does not provide HTML body part. This message contains a hyperlink but does not provide
the ability to resolve the hyperlink. To resolve the hyperlink the the ability to resolve the hyperlink. To resolve the hyperlink the
receiving client would need either IP access to the Internet, or an receiving client would need either IP access to the Internet, or an
electronic mail web gateway. electronic mail web gateway.
From: foo1@bar.net From: foo1@bar.net
To: foo2@bar.net To: foo2@bar.net
Subject: A simple example Subject: A simple example
Mime-Version: 1.0 Mime-Version: 1.0
Content-Type: Text/HTML; charset=US-ASCII Content-Type: text/html; charset=US-ASCII
<HTML> <HTML>
<head></head> <head></head>
<body> <body>
<h1>Hi there!</h1> <h1>Hi there!</h1>
An example of an HTML message.<p> An example of an HTML message.<p>
Try clicking <a href="http://www.resnova.com/">here.</a><p> Try clicking <a href="http://www.resnova.com/">here.</a><p>
</body></HTML> </body></HTML>
9.2 Example with absolute URIs to an embedded GIF picture 9.2 Example with absolute URIs to an embedded GIF picture
From: foo1@bar.net From: foo1@bar.net
To: foo2@bar.net To: foo2@bar.net
Subject: A simple example Subject: A simple example
Mime-Version: 1.0 Mime-Version: 1.0
Content-Type: "multipart/related"; boundary="boundary-example-1"; Content-Type: "multipart/related"; boundary="boundary-example-1";
type="Text/HTML"; start=<foo3*foo1@bar.net> type="text/html"; start=<foo3*foo1@bar.net>
--boundary-example-1 --boundary-example-1
Content-Type: Text/HTML;charset=US-ASCII Content-Type: text/html;charset=US-ASCII
Content-ID: <foo3*foo1@bar.net> Content-ID: <foo3*foo1@bar.net>
... text of the HTML document, which might contain a hyperlink ... text of the HTML document, which might contain a hyperlink
to the other body part, for example through a statement such as: to the other body part, for example through a statement such as:
<IMG SRC="http://www.ietf.cnri.reston.va.us/images/ietflogo.gif" <IMG SRC="http://www.ietf.cnri.reston.va.us/images/ietflogo.gif"
ALT="IETF logo"> ALT="IETF logo">
--boundary-example-1 --boundary-example-1
Content-Location: Content-Location:
http://www.ietf.cnri.reston.va.us/images/ietflogo.gif http://www.ietf.cnri.reston.va.us/images/ietflogo.gif
skipping to change at line 778 skipping to change at line 778
--boundary-example-1-- --boundary-example-1--
9.3 Example with relative URIs to an embedded GIF picture 9.3 Example with relative URIs to an embedded GIF picture
From: foo1@bar.net From: foo1@bar.net
To: foo2@bar.net To: foo2@bar.net
Subject: A simple example Subject: A simple example
Mime-Version: 1.0 Mime-Version: 1.0
Content-Type: "multipart/related"; boundary="boundary-example-1"; Content-Type: "multipart/related"; boundary="boundary-example-1";
type="Text/HTML" type="text/html"
--boundary-example-1 --boundary-example-1
Content-Base: http://www.ietf.cnri.reston.va.us Content-Base: http://www.ietf.cnri.reston.va.us/
Content-Type: Text/HTML; charset=ISO-8859-1 Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE Content-Transfer-Encoding: QUOTED-PRINTABLE
... text of the HTML document, which might contain a hyperlink ... text of the HTML document, which might contain a hyperlink
to the other body part, for example through a statement such as: to the other body part, for example through a statement such as:
<IMG SRC="/images/ietflogo.gif" ALT="IETF logo"> <IMG SRC="/images/ietflogo.gif" ALT="IETF logo">
Example of a copyright sign encoded with Quoted-Printable: =A9 Example of a copyright sign encoded with Quoted-Printable: =A9
Example of a copyright sign mapped onto HTML markup: &#168; Example of a copyright sign mapped onto HTML markup: &#168;
--boundary-example-1 --boundary-example-1
Content-Base: http://www.ietf.cnri.reston.va.us/images/
Content-Location: ietflogo.gif Content-Location: ietflogo.gif
Content-Base: http://www.ietf.cnri.reston.va.us/images/
; Note that the fact that the Content-Base comes after the
; Content-Location within the same Content-Heading will not
; influence their interpretation
Content-Type: "IMAGE/GIF" Content-Type: "IMAGE/GIF"
Content-Transfer-Encoding: BASE64 Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5 R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
etc... etc...
--boundary-example-1-- --boundary-example-1--
9.4 Example with relative URIs and no BASE available 9.4 Example with relative URIs and no BASE available
From: foo1@bar.net From: foo1@bar.net
To: foo2@bar.net To: foo2@bar.net
Subject: A simple example Subject: A simple example
Mime-Version: 1.0 Mime-Version: 1.0
Content-Type: "multipart/related"; boundary="boundary-example-1"; Content-Type: "multipart/related"; boundary="boundary-example-1";
type="Text/HTML" type="text/html"
--boundary-example-1 --boundary-example-1
Content-Type: Text/HTML; charset=ISO-8859-1 Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE Content-Transfer-Encoding: QUOTED-PRINTABLE
... text of the HTML document, which might contain a hyperlink ... text of the HTML document, which might contain a hyperlink
to the other body part, for example through a statement such as: to the other body part, for example through a statement such as:
<IMG SRC="ietflogo.gif" ALT="IETF logo"> <IMG SRC="ietflogo.gif" ALT="IETF logo">
Example of a copyright sign encoded with Quoted-Printable: =A9 Example of a copyright sign encoded with Quoted-Printable: =A9
Example of a copyright sign mapped onto HTML markup: &#168; Example of a copyright sign mapped onto HTML markup: &#168;
--boundary-example-1 --boundary-example-1
Content-Location: ietflogo.gif Content-Location: ietflogo.gif
skipping to change at line 840 skipping to change at line 843
--boundary-example-1-- --boundary-example-1--
9.5 Example using a BASE on the Multipart 9.5 Example using a BASE on the Multipart
From: foo1@bar.net From: foo1@bar.net
To: foo2@bar.net To: foo2@bar.net
Subject: A simple example Subject: A simple example
Mime-Version: 1.0 Mime-Version: 1.0
Content-Type: "multipart/related"; boundary="boundary-example-1"; Content-Type: "multipart/related"; boundary="boundary-example-1";
type="Text/HTML" type="text/html"
Content-Base: http://www.ietf.cnri.reston.va.us/ Content-Base: http://www.ietf.cnri.reston.va.us/
--boundary-example-1 --boundary-example-1
Content-Type: Text/HTML; charset=ISO-8859-1 Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE Content-Transfer-Encoding: QUOTED-PRINTABLE
... text of the HTML document, which might contain a hyperlink ... text of the HTML document, which might contain a hyperlink
to the other body part, for example through a statement such as: to the other body part, for example through a statement such as:
<IMG SRC="ietflogo.gif" ALT="IETF logo"> <IMG SRC="ietflogo.gif" ALT="IETF logo">
Example of a copyright sign encoded with Quoted-Printable: =A9 Example of a copyright sign encoded with Quoted-Printable: =A9
Example of a copyright sign mapped onto HTML markup: &#168; Example of a copyright sign mapped onto HTML markup: &#168;
--boundary-example-1 --boundary-example-1
Content-Location: http://www.ietf.cnri.reston.va.us/ietflogo.gif Content-Location: http://www.ietf.cnri.reston.va.us/ietflogo.gif
skipping to change at line 872 skipping to change at line 875
--boundary-example-1-- --boundary-example-1--
9.6 Example using CID URL and Content-ID header to an embedded GIF 9.6 Example using CID URL and Content-ID header to an embedded GIF
picture picture
From: foo1@bar.net From: foo1@bar.net
To: foo2@bar.net To: foo2@bar.net
Subject: A simple example Subject: A simple example
Mime-Version: 1.0 Mime-Version: 1.0
Content-Type: "multipart/related"; boundary="boundary-example-1"; Content-Type: "multipart/related"; boundary="boundary-example-1";
type="Text/HTML" type="text/html"
--boundary-example-1 --boundary-example-1
Content-Type: Text/HTML; charset=US-ASCII Content-Type: text/html; charset=US-ASCII
... text of the HTML document, which might contain a hyperlink ... text of the HTML document, which might contain a hyperlink
to the other body part, for example through a statement such as: to the other body part, for example through a statement such as:
<IMG SRC="cid:foo4*foo1@bar.net" ALT="IETF logo"> <IMG SRC="cid:foo4*foo1@bar.net" ALT="IETF logo">
--boundary-example-1 --boundary-example-1
Content-Location: CID:something@else ; this header is disregarded Content-Location: CID:something@else ; this header is disregarded
Content-ID: <foo4*foo1@bar.net> Content-ID: <foo4*foo1@bar.net>
Content-Type: "IMAGE/GIF" Content-Type: "IMAGE/GIF"
Content-Transfer-Encoding: BASE64 Content-Transfer-Encoding: BASE64
R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5 R0lGODlhGAGgAPEAAP/////ZRaCgoAAAACH+PUNvcHlyaWdodCAoQykgMTk5
NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A NSBJRVRGLiBVbmF1dGhvcml6ZWQgZHVwbGljYXRpb24gcHJvaGliaXRlZC4A
etc... etc...
--boundary-example-1-- --boundary-example-1--
10. Content-Disposition header 10. Content-Disposition header
Note the specification in [REL] on the relations between Note the specification in [REL] on the relations between
Content-Disposition and "multipart/related". Content-Disposition and multipart/related.
11. Character encoding issues and end-of-line issues 11. Character encoding issues and end-of-line issues
For the encoding of characters in HTML documents and other text For the encoding of characters in HTML documents and other text
documents into a MIME-compatible octet stream, the following mechanisms documents into a MIME-compatible octet stream, the following mechanisms
are relevant: are relevant:
- HTML [HTML2], [HTML-I18N] as an application of SGML [SGML] allows - HTML [HTML2], [HTML-I18N] as an application of SGML [SGML] allows
characters to be denoted by character entities as well as by numeric characters to be denoted by character entities as well as by numeric
character references (e.g. "Latin small letter a with acute accent" may character references (e.g. "Latin small letter a with acute accent"
be represented by "&aacute;" or "&#225;") in the HTML markup. may be represented by "&aacute;" or "&#225;") in the HTML markup.
- HTML documents, in common with other documents of the MIME - HTML documents, in common with other documents of the MIME
"Content-Type text", can be represented in MIME using one of several "Content-Type text", can be represented in MIME using one of several
character encodings. The MIME Content-Type "charset" parameter value character encodings. The MIME Content-Type "charset" parameter value
indicates the particular encoding used. For the exact meaning and use indicates the particular encoding used. For the exact meaning and
of the "charset" parameter, please see [MIME2] chapter 4. use of the "charset" parameter, please see [MIME2] chapter 4.
Note that the "charset" parameter refers only to the MIME Note that the "charset" parameter refers only to the MIME character
character encoding. For example, the string "&aacute;" can be sent in encoding. For example, the string "&aacute;" can be sent in MIME
MIME with "charset=US-ASCII", while the raw character "Latin small with "charset=US-ASCII", while the raw character "Latin small letter
letter a with acute accent" cannot. a with acute accent" cannot.
The above mechanisms are well defined and documented, and therefore not The above mechanisms are well defined and documented, and therefore not
further explained here. In sending a message, all the above mentioned further explained here. In sending a message, all the above mentioned
mechanisms MAY be used, and any mixture of them MAY occur when sending mechanisms MAY be used, and any mixture of them MAY occur when sending
the document via e-mail. Receiving mail user agents (together with any the document in MIME format. Receiving user agents (together with any
Web browser they may use to display the document) MUST be capable of Web browser they may use to display the document) MUST be capable of
handling any combinations of these mechanisms. handling any combinations of these mechanisms.
Also note that: Also note that:
- Any documents including HTML documents that contain octet values - Any documents including HTML documents that contain octet values
outside the 7-bit range need a content-transfer-encoding applied before outside the 7-bit range need a content-transfer-encoding applied
transmission over certain transport protocols [MIME1, chapter 5]. before transmission over certain transport protocols [MIME1,
chapter 5].
- The MIME standard [MIME2] requires that documents of - The MIME standard [MIME2] requires that emailed documents of
"Content-Type: Text MUST be in canonical form before "Content-Type: Text MUST be in canonical form before
Content-Transfer-Encoding, i.e. that line breaks are encoded as CRLFs, Content-Transfer-Encoding, i.e. that line breaks are encoded as
not as bare CRs or bare LFs or something else. This is in contrast to CRLFs, not as bare CRs or bare LFs or something else. This is in
[HTTP] where section 3.6.1 allows other representations of line breaks. contrast to [HTTP] where section 3.6.1 allows other representations
of line breaks.
Note that this might cause problems with integrity checks based on Note that this might cause problems with integrity checks based on
checksums, which might not be preserved when moving a document from the checksums, which might not be preserved when moving a document from the
HTTP to the MIME environment. If a document has to be converted in such HTTP to the MIME environment. If a document has to be converted in such
a way that a checksum integrity check becomes invalid, then this a way that a checksum integrity check becomes invalid, then this
integrity check header SHOULD be removed from the document. integrity check header SHOULD be removed from the document.
Other sources of problems are Content-Encoding used in HTTP but not Other sources of problems are Content-Encoding used in HTTP but not
allowed in MIME, and charsets that are not able to represent line allowed in MIME, and charsets that are not able to represent line
breaks as CRLF. A good overview of the differences between HTTP and breaks as CRLF. A good overview of the differences between HTTP and
skipping to change at line 968 skipping to change at line 973
CRLF for line breaks. CRLF for line breaks.
Some transport mechanisms may specify a default "charset" parameter if Some transport mechanisms may specify a default "charset" parameter if
none is supplied [HTTP, MIME1]. Because the default differs for none is supplied [HTTP, MIME1]. Because the default differs for
different mechanisms, when HTML is transferred through mail, the different mechanisms, when HTML is transferred through mail, the
charset parameter SHOULD be included, rather than relying on the charset parameter SHOULD be included, rather than relying on the
default. default.
12. Security Considerations 12. Security Considerations
Some Security Considerations include the potential to mail someone an Some Security Considerations include the potential to send someone an
object, and claim that it is represented by a particular URI (by giving object, and claim that it is represented by a particular URI (by giving
it a Content-Location header). There can be no assurance that a WWW it a Content-Location header). There can be no assurance that a WWW
request for that same URI would normally result in that same object. It request (like HTTP or FTP) for that same URI would normally result in
might be unsuitable to cache the data in such a way that the cached that same object. It might be unsuitable to cache the data in such a
data can be used for retrieval of this URI from other messages or way that the cached data can be used for retrieval of this URI from
message parts than those included in the same message as the other messages or message parts than those included in the same message
Content-Location header. Because of this problem, receiving User Agents as the Content-Location header. Because of this problem, receiving User
SHOULD not cache this data in the same way that data that was retrieved Agents SHOULD not cache this data in the same way that data that was
through an HTTP or FTP request might be cached. retrieved through an HTTP or FTP request might be cached.
URLs, especially File URLs, may in their name contain company-internal URIs, especially File URIs, may in their name contain company-internal
information, which may then inadvertently be revealed to recipients of information, which may then inadvertently be revealed to recipients of
documents containing such URLs. documents containing such URIs.
One way of implementing messages with linked body parts is to handle One way of implementing messages with linked body parts is to handle
the linked body parts in a combined mail and WWW proxy server. The mail the linked body parts in a combined mail and WWW proxy server. The mail
client is only given the start body part, which it passes to a web client is only given the start body part, which it passes to a web
browser. This web browser requests the linked parts from the proxy browser. This web browser requests the linked parts from the proxy
server. If this method is used, and if the combined server is used by server. If this method is used, and if the combined server is used by
more than one user, then methods must be employed to ensure that body more than one user, then methods must be employed to ensure that body
parts of a message to one person is not retrievable by another person. parts of a message to one person is not retrievable by another person.
Use of passwords (also known as tickets or magic cookies) is one way of Use of passwords (also known as tickets or magic cookies) is one way of
achieving this. Note that some caching WWW proxy servers may not achieving this. Note that some caching WWW proxy servers may not
distinguish between cached objects from e-mail and HTTP, which may be a distinguish between cached objects from email and HTTP, which may be a
security risk. security risk.
In addition, by allowing people to mail aggregate objects, we are In addition, by allowing people to mail aggregate objects, we are
opening the door to other potential security problems that until now opening the door to other potential security problems that until now
were only problems for WWW users. For example, some HTML documents now were only problems for WWW users. For example, some HTML documents now
either themselves contain executable content (JavaScript) or contain either themselves contain executable content (JavaScript) or contain
links to executable content (The "INSERT" specification, Java). It links to executable content (The "INSERT" specification, Java). It
would be exceedingly dangerous for a receiving User Agent to execute would be exceedingly dangerous for a receiving User Agent to execute
content received through a mail message without careful attention to content received through a mail message without careful attention to
restrictions on the capabilities of that executable content. restrictions on the capabilities of that executable content.
Some WWW applications hide passwords and tickets (access tokens to Some WWW applications hide passwords and tickets (access tokens to
information which may not be available to anyone) and other sensitive information which may not be available to anyone) and other sensitive
information in hidden fields in the web documents or in on-the-fly information in hidden fields in the web documents or in on-the-fly
constructed URLs. If a person gets such a document, and forwards it via constructed URIs. If a person gets such a document, and forwards it via
e-mail, the person may inadvertently disclose sensitive information. email, the person may inadvertently disclose sensitive information.
13. Differences as compared to the previous version of this proposed 13. Differences as compared to the previous version of this proposed
standard in RFC 2110 standard in RFC 2110
The specification has been changed to show that the formats described
do not only apply to multipart MIME in email, but also to multipart
MIME transferred through other protocols such as HTTP or FTP.
In order to agree with [RELURL], Content-Base headers in multipart In order to agree with [RELURL], Content-Base headers in multipart
Content-Headings can now be used to resolve relative URLs in their Content-Headings can now be used to resolve relative URIs in their
component parts, but only if no base URL can be derived from the component parts, but only if no base URI can be derived from the
component part itself. Base URLs in inner headings, both in Content- component part itself. Base URIs in inner headings, both in Content-
Base and Content-Location headers, have precedence over base URls in Base and Content-Location headers, have precedence over base URIs in
outer multipart headings. outer multipart headings.
Specification added that a Content-Heading cannot contain more than one Specification has been added that a Content-Heading cannot contain more
Content-Location header. than one Content-Location header.
A section 4.4.1 has been added, specifying how to handle the case of A section 4.4.1 has been added, specifying how to handle the case of
sending a body part whose URI does not agree with the correct URI sending a body part whose URI does not agree with the correct URI
syntax. syntax.
The handling of relative and absolute URIs for matching between body The handling of relative and absolute URIs for matching between body
parts have been merged into a single description, by specifying that parts have been merged into a single description, by specifying that
relative URIs which cannot be resolved otherwise should be handled as relative URIs which cannot be resolved otherwise should be handled as
if they had been given imaginary URL "This_message:/". if they had been given imaginary URL "this_message:/".
14. Acknowledgments 14. Copyright
Copyright (C) The Internet Society (date). All Rights Reserved.
This document and translations of it may be copied and furnished to
others, and derivative works that comment on or otherwise explain it or
assist in its implmentation may be prepared, copied, published and
distributed, in whole or in part, without restriction of any kind,
provided that the above copyright notice and this paragraph are
included on all such copies and derivative works. However, this
document itself may not be modified in any way, such as by removing the
copyright notice or references to the Internet Society or other
Internet organizations, except as needed for the purpose of developing
Internet standards in which case the procedures for copyrights defined
in the Internet Standards process must be followed, or as required to
translate it into languages other than English.
The limited permissions granted above are perpetual and will not be
revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL
NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
FITNESS FOR A PARTICULAR PURPOSE.
15. Acknowledgments
Harald T. Alvestrand, Richard Baker, Isaac Chan, Dave Crocker, Martin Harald T. Alvestrand, Richard Baker, Isaac Chan, Dave Crocker, Martin
J. Duerst, Lewis Geer, Roy Fielding, Ned Freed, Al Gilman, Paul J. Duerst, Lewis Geer, Roy Fielding, Ned Freed, Al Gilman, Paul
Hoffman, Andy Jacobs, Richard W. Jesmajian, Mark K. Joseph, Greg Hoffman, Andy Jacobs, Richard W. Jesmajian, Mark K. Joseph, Greg
Herlihy, Valdis Kletnieks, Daniel LaLiberte, Ed Levinson, Jay Levitt, Herlihy, Valdis Kletnieks, Daniel LaLiberte, Ed Levinson, Jay Levitt,
Albert Lunde, Larry Masinter, Keith Moore, Gavin Nicol, Martyn W. Peck, Albert Lunde, Larry Masinter, Keith Moore, Gavin Nicol, Martyn W. Peck,
Pete Resnick, Nick Shelness, Jon Smirl, Einar Stefferud, Jamie Pete Resnick, Nick Shelness, Jon Smirl, Einar Stefferud, Jamie
Zawinski, Steve Zilles and several other people have helped us with Zawinski, Steve Zilles and several other people have helped us with
preparing this document. I alone take responsibility for any errors preparing this document. I alone take responsibility for any errors
which may still be in the document. which may still be in the document.
15. References 16. References
Ref. Author, title Ref. Author, title
--------- -------------------------------------------------------- --------- --------------------------------------------------------
[CONDISP] R. Troost, S. Dorner: "Communicating Presentation [CONDISP] R. Troost, S. Dorner: "Communicating Presentation
Information in Internet Messages: The Information in Internet Messages: The
Content-Disposition Header", RFC 1806, June 1995. Content-Disposition Header", RFC 1806, June 1995.
[HOSTS] R. Braden (editor): "Requirements for Internet Hosts -- [HOSTS] R. Braden (editor): "Requirements for Internet Hosts --
Application and Support", STD-3, RFC 1123, October 1989. Application and Support", STD-3, RFC 1123, October 1989.
skipping to change at line 1069 skipping to change at line 1105
[HTML2] T. Berners-Lee, D. Connolly: "Hypertext Markup Language [HTML2] T. Berners-Lee, D. Connolly: "Hypertext Markup Language
- 2.0", RFC 1866, November 1995. - 2.0", RFC 1866, November 1995.
[HTTP] T. Berners-Lee, R. Fielding, H. Frystyk: Hypertext [HTTP] T. Berners-Lee, R. Fielding, H. Frystyk: Hypertext
Transfer Protocol -- HTTP/1.0. RFC 1945, May 1996. Transfer Protocol -- HTTP/1.0. RFC 1945, May 1996.
[MD5] R. Rivest: "The MD5 Message-Digest Algorithm", RFC 1321, [MD5] R. Rivest: "The MD5 Message-Digest Algorithm", RFC 1321,
April 1992. April 1992.
[MIDCID] E. Levinson: [MIDCID] E. Levinson: Message/External-Body Content-ID
" Access"Message/External-Body Content-ID and Message-ID
Uniform Resource Locators", draft-ietf-mhtml-cid-v2-
Message/External-Body Content-ID Access"Message/External- 00.txt, July 1997.
Body Content-ID and Message-ID Uniform Resource
Locators", RFC 2111, February 1997.
%%% This must be replaced by a reference to the new IETF
draft which replaces RFC 2111 %%%
[MIME1] N. Freed, N. Borenstein, "Multipurpose Internet Mail [MIME1] N. Freed, N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message Extensions (MIME) Part One: Format of Internet Message
Bodies", RFC 2045, December 1996. Bodies", RFC 2045, December 1996.
. .
[MIME-IMB] N. Freed & N. Borenstein [MIME-IMB] N. Freed & N. Borenstein
:: "Multipurpose Internet Mail Extensions (MIME) Part :: "Multipurpose Internet Mail Extensions (MIME) Part
One: Format of Internet Message Bedies". RFC 2045, One: Format of Internet Message Bedies". RFC 2045,
November 1996. November 1996.
[MIME2] N. Freed, N. Borenstein, "Multipurpose Internet Mail [MIME2] N. Freed, N. Borenstein, "Multipurpose Internet Mail
Extensions (MIME) Part Two: Media Types", RFC 2046, Extensions (MIME) Part Two: Media Types", RFC 2046,
December 1996. December 1996.
[MIME3] K. Moore, "MIME (Multipurpose Internet Mail Extensions) [MIME3] K. Moore, "MIME (Multipurpose Internet Mail Extensions)
Part Three: Message Header Extensions for Non-ASCII Part Three: Message Header Extensions for Non-ASCII
Text", RFC 2047, December 1996. Text", RFC 2047, December 1996.
[MIME1] N. Borenstein & N. Freed: "MIME (Multipurpo [MIME1] N. Borenstein & N. Freed: "MIME (Multipurpose Internet
N. Borenstein & N. Freed:se Internet Mail Extensions) Mail Extensions) Part One: Mechanisms for Specifying and
Part One: Mechanisms for Specify ing and Describing the Format of Internet Message
One: Mechanisms for Specifying and ing and Describing Bodies", RFC 1521, Sept 1993.
the Format of Internet Message Bodies", RFC 1521, Sept
1993.
[MIME4] N. Freed, J. Klensin, J. Postel, "Multipurpose Internet [MIME4] N. Freed, J. Klensin, J. Postel, "Multipurpose Internet
Mail Extensions (MIME) Part Four: Registration Mail Extensions (MIME) Part Four: Registration
Procedures", RFC 2048, January 1997. Procedures", RFC 2048, January 1997.
[MIME5] "Multipurpose Internet Mail Extensions (MIME) Part Five: [MIME5] "Multipurpose Internet Mail Extensions (MIME) Part Five:
Conformance Criteria and Examples", RFC 2049, December Conformance Criteria and Examples", RFC 2049, December
1996. 1996.
[NEWS] M.R. Horton, R. Adams: "Standard for interchange of [NEWS] M.R. Horton, R. Adams: "Standard for interchange of
USENET messages", RFC 1036, December 1987. USENET messages", RFC 1036, December 1987.
[PDF] Tim Bienz and Richar Cohn: "Portable Document Format [PDF] Tim Bienz and Richar Cohn: "Portable Document Format
Reference Manual", Addison-Wesley, Reading, MA, USA, Reference Manual", Addison-Wesley, Reading, MA, USA,
1993, ISBN 0-201-62628-4. 1993, ISBN 0-201-62628-4.
[REL] Edward Levinson: "The MIME [REL] Edward Levinson: "The MIME
Multipart/Related"multipart/related" Content-Type", RFC Multipart/Related"multipart/related" Content-Type",
2112, February 1997. draft-ietf-mhtml-re-v2-00.txt, September 1997.
%%% This must be replaced by a reference to the new IETF
draft which replaces RFC 2112 %%%
[RELURL] R. Fielding: "Relative Uniform Resource Locators", RFC [RELURL] R. Fielding: "Relative Uniform Resource Locators", RFC
1808, June 1995. 1808, June 1995.
[RFC822] D. Crocker: "Standard for the format of ARPA Internet [RFC822] D. Crocker: "Standard for the format of ARPA Internet
text messages." STD 11, RFC 822, August 1982. text messages." STD 11, RFC 822, August 1982.
[SGML] ISO 8879. Information Processing -- Text and Office - [SGML] ISO 8879. Information Processing -- Text and Office -
Standard Generalized Markup Language (SGML), Standard Generalized Markup Language (SGML),
1986. <URL:http://www.iso.ch/cate/d16387.html> 1986. <URL:http://www.iso.ch/cate/d16387.html>
skipping to change at line 1145 skipping to change at line 1173
Resource Locators (URL)", RFC 1738, December 1994. Resource Locators (URL)", RFC 1738, December 1994.
[URLBODY] N. Freed and Keith Moore: "Definition of the URL MIME [URLBODY] N. Freed and Keith Moore: "Definition of the URL MIME
External-Body Access-Type", RFC 2017, October 1996. External-Body Access-Type", RFC 2017, October 1996.
[VRML] Gavin Bell, Anthony Parisi, Mark Pesce: "Virtual Reality [VRML] Gavin Bell, Anthony Parisi, Mark Pesce: "Virtual Reality
Modeling Language (VRML) Version 1.0 Language Modeling Language (VRML) Version 1.0 Language
Specification." May 1995, Specification." May 1995,
http://www.vrml.org/Specifications/. http://www.vrml.org/Specifications/.
16. Author's Addresses [IETF-TERMS] S. Bradner: Key words for use in RFCs to Indicate
Requirements Levels. RFC 2119, March 1997.
17. Author's Addresses
For contacting the editors, preferably write to Jacob Palme rather than For contacting the editors, preferably write to Jacob Palme rather than
Alex Hopmann. Alex Hopmann.
Jacob Palme Phone: +46-8-16 16 67 Jacob Palme Phone: +46-8-16 16 67
Stockholm University and KTH Fax: +46-8-783 08 29 Stockholm University and KTH Fax: +46-8-783 08 29
Electrum 230 E-mail: jpalme@dsv.su.se Electrum 230 Email: jpalme@dsv.su.se
S-164 40 Kista, Sweden S-164 40 Kista, Sweden
Alex Hopmann E-mail: alexhop@microsoft.com Alex Hopmann Email: alexhop@microsoft.com
Microsoft Corporation Microsoft Corporation
3590 North First Street 3590 North First Street
Suite 300 Suite 300
San Jose San Jose
CA 95134 CA 95134
Working group chairman: Working group chairman:
Einar Stefferud <stef@nma.com> Einar Stefferud <stef@nma.com>
I. I.
 End of changes. 98 change blocks. 
204 lines changed or deleted 235 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/