NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Get The TCP/IP Guide for your own computer.
The TCP/IP Guide

Google
Web TCP/IP Guide






Table Of Contents  The TCP/IP Guide
 9  TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7)
      9  TCP/IP Key Applications and Application Protocols
           9  TCP/IP File and Message Transfer Applications and Protocols (FTP, TFTP, Electronic Mail, USENET, HTTP/WWW, Gopher)
                9  TCP/IP Electronic Mail System: Concepts and Protocols (RFC 822, MIME, SMTP, POP3, IMAP)
                     9  TCP/IP Electronic Mail Message Formats and Message Processing: RFC 822 and MIME
                          9  TCP/IP Enhanced Electronic Mail Message Format: Multipurpose Internet Mail Extensions (MIME)

Previous Topic/Section
MIME Content-Type Header and Discrete Media: Types, Subtypes and Parameters
Previous Page
Pages in Current Topic/Section
12
3
456
Next Page
MIME Content-Transfer-Encoding Header and Encoding Methods
Next Topic/Section

MIME Composite Media Types: Multipart and Encapsulated Message Structures
(Page 3 of 6)

Multipart Message Encoding

You can see just from these different subtypes how much flexibility the multipart type provides to MIME, and there are others. In all cases, the same syntax is used to encode the constituent body parts into a single message. The basic process is as follows:

  1. Each individual piece of data is processed as if it were to be transmitted as the body of a discrete media type MIME message. This includes the specification of appropriate headers, such as Content-Type, Content-ID and Content-Transfer-Encoding, as needed.

  2. A special boundary delimiter is chosen to separate the body parts. It must be selected so that it will not appear in any of the body parts; a random string is sometimes used. It is prepended with two dashes (“--”) when placed in the message to reduce the chance of it being mistaken for data.

  3. The multipart message is assembled. It consists of a preamble text area, then a boundary line, followed by the first body part. Each subsequent body part is separated from the previous one with another boundary line. After the last body part, another boundary line appears, followed by an epilogue text area.

  4. The special parameter boundary is included in the Content-Type header of the message as a whole, to tell the recipient what pattern separates the body parts.

Key Concept: MIME multipart messages are formed by first processing each individual data component to create a MIME body part. Each can have a distinct encoding method and set of headers, as if it were a separate MIME message. These body parts are then combined into a single multipart message, and separated with a boundary delimiter. The identity of the delimiter is inserted into the boundary parameter of the Content-Type header, so the recipient can easily separate the individual body parts upon receipt of the message.



Previous Topic/Section
MIME Content-Type Header and Discrete Media: Types, Subtypes and Parameters
Previous Page
Pages in Current Topic/Section
12
3
456
Next Page
MIME Content-Transfer-Encoding Header and Encoding Methods
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.