The time has come the walrus said ...
It is up to the receiving system to choose the appropriate rendition. If boldface and italics are
available, they can be used; otherwise, colors, blinking, underlining, reverse video, etc., can
be used for emphasis. Different systems can, and do, make different choices.
When the Web became popular, a new subtype
text/html was added (in RFC 2854) to allow
Web pages to be sent in RFC 822 e-mail. A subtype for the extensible markup language,
text/xml, is defined in RFC 3023. We will study HTML and XML later in this chapter.
The next MIME type is
image, which is used to transmit still pictures. Many formats are widely
used for storing and transmitting images nowadays, both with and without compression. Two
of these, GIF and JPEG, are built into nearly all browsers, but many others exist as well and
have been added to the original list.
The
audio and video types are for sound and moving pictures, respectively. Please note that
video includes only the visual information, not the soundtrack. If a movie with sound is to be
transmitted, the video and audio portions may have to be transmitted separately, depending
on the encoding system used. The first video format defined was the one devised by the
modestly-named Moving Picture Experts Group (MPEG), but others have been added since. In
addition to
audio/basic, a new audio type, audio/mpeg was added in RFC 3003 to allow people
to e-mail MP3 audio files.
The
application type is a catchall for formats that require external processing not covered by
one of the other types. An
octet-stream is just a sequence of uninterpreted bytes. Upon
receiving such a stream, a user agent should probably display it by suggesting to the user that
it be copied to a file and prompting for a file name. Subsequent processing is then up to the
user.
The other defined subtype is
postscript, which refers to the PostScript language defined by
Adobe Systems and widely used for describing printed pages. Many printers have built-in
PostScript interpreters. Although a user agent can just call an external PostScript interpreter to
display incoming PostScript files, doing so is not without some danger. PostScript is a full-
blown programming language. Given enough time, a sufficiently masochistic person could write
a C compiler or a database management system in PostScript. Displaying an incoming
PostScript message is done by executing the PostScript program contained in it. In addition to
displaying some text, this program can read, modify, or delete the user's files, and have other
nasty side effects.
The
message type allows one message to be fully encapsulated inside another. This scheme is
useful for forwarding e-mail, for example. When a complete RFC 822 message is encapsulated
inside an outer message, the
rfc822 subtype should be used.
The
partial subtype makes it possible to break an encapsulated message into pieces and send
them separately (for example, if the encapsulated message is too long). Parameters make it
possible to reassemble all the parts at the destination in the correct order.
Finally, the
external-body subtype can be used for very long messages (e.g., video films).
Instead of including the MPEG file in the message, an FTP address is given and the receiver's
user agent can fetch it over the network at the time it is needed. This facility is especially
useful when sending a movie to a mailing list of people, only a few of whom are expected to
view it (think about electronic junk mail containing advertising videos).
The final type is
multipart, which allows a message to contain more than one part, with the
beginning and end of each part being clearly delimited. The
mixed subtype allows each part to
be different, with no additional structure imposed. Many e-mail programs allow the user to