Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Internet Protocols Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

8.3 MIME Basics

Although the complete specification of the MIME format includes a great deal of detail, the basic principles are easy to understand. This section presents a quick overview of the most important points.

8.3.1 Part and Message

A document in MIME format is referred to as a MIME part. A MIME part that can be used as a top-level document is called a MIME message.

The only difference between a MIME part and a MIME message is that a MIME message contains a MIME-Version header. In this guide, we use "message" to refer to parts with a MIME-Version header.

8.3.2 Part Structure

The basic structure of a MIME part consists of a list of headers and a body. The key feature of the MIME specification is a standardized set of headers that describe the structure and content of the part. Each header field consists of a label and a value. Some values contain one or more parameters. For example, the header:

contains the label Content-Type and the value text/plain; charset=us-ascii. The value contains the content type text/plain and a single parameter. The parameter contains the name charset and the value us-ascii. In short, the header describes the part body as plain text in the US-ASCII character set. The only role of a MIME header is to describe the content of the part or identify the MIME version used. MIME headers don't have anything to do with the transport protocol used for the message.

The body of a MIME part is the content of the part. The content can be simple data, such as unstructured text or an encoded image. Alternatively, the part can contain other MIME parts. Each nested MIME part contains its own headers and body.

8.3.3 MIME Headers

Each MIME header in a part contains information about the part. The most important aspect of using the MIME format is understanding the MIME headers. This section presents a quick overview of the headers supported by the MIME package. Section 10.1, "Using the MIME Headers Effectively," presents a more detailed look at the MIME headers.

8.3.4 Part Body

The body of a part is the actual content of the part. As mentioned earlier, the body can be simply data or, if the Content-Type of the message is multipart, the body can contain other MIME parts.



Previous fileTop of DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.