CGI and Perl

The MIME-Version Header Field

The MIME-Version header field uses a version number to declare a message to be conformant with this specification and allows mail processing agents to distinguish between such messages and those generated by older or non-conformant software, which is presumed to lack such a field.

The Content-Type Header Field

The Content-Type header field is used to specify the "type" and "subtype" of data in the body of a message and to fully specify the encoding of the data. There are seven main Content-Types, each with a growing number of subtypes. MIME has been carefully designed as an extensible mechanism, and it is expected that the set of content-type/subtype pairs and their associated parameters will grow significantly with time. Here are the seven main Content-Types along with currently defined subtypes. Text A text Content-Type value can be used to represent textual information in a number of character sets and formatted text description languages in a standardized manner:

text/html                        html htm
 text/plain                       txt pl
 text/richtext                    rtx
 text/tab-separated-values        tsv
 text/x-setext                    etx

Multipart A multipart Content-Type value can be used to combine several body parts, possibly of differing types of data, into a single message. Multipart/Alternative This signifies multiple content-types with the same (or similar) information. Multipart/Digest This signifies a series of included mail messages. Messages are of type message/RFC822 unless an explicit content-type is specified for each part. Multipart/Mixed This signifies data with multiple content-types. Multipart/Parallel This is similar to multipart/mixed data in parallel. Application An application Content-Type value can be used to transmit application data or binary data, and hence, among other uses, to implement an electronic mail file transfer service:

application/octet-stream          bin
 application/oda                   oda
 application/pdf                   pdf
 application/postscript            ai eps ps
 application/rtf                   rtf
 application/x-mif                 mif
 application/x-maker               fm
 application/x-csh                 csh
 application/x-dvi                 dvi
 application/x-hdf                 hdf
 application/x-latex               latex
 application/x-netcdf              nc cdf
 application/x-sh                  sh
 application/x-tcl                 tcl
 application/x-tex                 tex
 application/x-texinfo             texinfo texi
 application/x-troff               t tr roff
 application/x-troff-man           man
 application/x-troff-me            me
 application/x-troff-ms            ms
 application/x-wais-source         src
 application/zip                   zip
 application/x-bcpio               bcpio
 application/x-cpio                cpio
 application/x-gtar                gtar
 application/x-shar                shar
 application/x-sv4cpio             sv4cpio
 application/x-sv4crc              sv4crc
 application/x-tar                 tar
 application/x-ustar               ustar

Message A message Content-Type value can be used for encapsulating another message in the document. Message/RFC822 This signifies an included (MIME) mail message. Message/News This signifies an included (MIME) USENET news message. Message/Partial This signifies that the content is a single part of a message split into multiple mail messages. Image This is an image Content-Type value for transmitting still image (picture) data:

image/gif                          gif
 image/ief                          ief
 image/jpeg                         jpeg jpg jpe
 image/tiff                         tiff tif
 image/x-cmu-raster                 ras
 image/x-portable-anymap            pnm
 image/x-portable-bitmap            pbm
 image/x-portable-graymap           pgm
 image/x-portable-pixmap            ppm
 image/x-rgb                        rgb
 image/x-xbitmap                    xbm
 image/x-xpixmap                    xpm
 image/x-xwindowdump                xwd

Audio This is an audio Content-Type value for transmitting audio or voice data:

audio/bsic                        au snd
 audio/x-aiff                       aif aiff aifc
 audio/x-wav                        wav

Video This is a video Content-Type value for transmitting video or moving image data, possibly with audio as part of the composite video data format:

video/mpeg                         mpeg mpg mpe
 video/quicktime                    qt mov
 video/x-msvideo                    avi
 video/x-sgi-movie                  movie