MIME content headers

Tony Sanders <sanders@bsdi.com>
Message-id: <9305210600.AA11177@austin.BSDI.COM>
To: www-talk@nxoc01.cern.ch
Subject: MIME content headers
Organization: Berkeley Software Design, Inc.
Date: Fri, 21 May 1993 01:00:16 -0500
From: Tony Sanders <sanders@bsdi.com>
FYI: here is what I have so for generating MIME content headers.
e.g., foo.tar.Z.uu gets:
    Content-encoding: x-uuencode; x-compress
    Content-type: archive/tar
Does this sound about right now?  Are multiple Content-encoding's allowed
(and should I use commas or semicolons for the seperator)?

#
# Case sensitive; these are from Mosaic 1.0 and TkWWW 0.8
# Unknown data gets either application/octet-stream or text/plain
#
# MIME Content-type: application audio image text video archive
#
$ext{'ai'}    = $ext{'AI'}    = 'application/postscript';
$ext{'aiff'}  = $ext{'AIFF'}  = 'audio/x-aiff';
$ext{'au'}    = $ext{'AU'}    = 'audio/basic';
$ext{'dmp'}   = $ext{'DMP'}   = 'image/x11-dump';
$ext{'cave'}  = $ext{'CAVE'}  = 'image/x-cave';
$ext{'dvi'}   = $ext{'DVI'}   = 'application/dvi';
$ext{'eps'}   = $ext{'EPS'}   = 'application/postscript';
$ext{'evlm'}  = $ext{'EVLM'}  = 'image/x-elvm';
$ext{'gif'}   = $ext{'GIF'}   = 'image/gif';
$ext{'hqx'}   = $ext{'HQX'}   = 'image/x-hqx';                  # ???
$ext{'html'}  = $ext{'HTML'}  = 'text/html';
$ext{'jpeg'}  = $ext{'JPEG'}  = 'image/jpeg';
$ext{'jpg'}   = $ext{'JPG'}   = 'image/jpeg';
$ext{'latex'} = $ext{'LATEX'} = 'application/latex';
$ext{'m'}     = $ext{'M'}     = 'text/plain';
$ext{'mime'}  = $ext{'MIME'}  = 'www/mime';
$ext{'movie'} = $ext{'MOVIE'} = 'video/x-movie';
$ext{'mpeg'}  = $ext{'MPEG'}  = 'video/mpeg';
$ext{'mpg'}   = $ext{'MPG'}   = 'video/mpeg';
$ext{'pnm'}   = $ext{'PNM'}   = 'image/portable-anymap';
$ext{'pbm'}   = $ext{'PBM'}   = 'image/portable-bitmap';
$ext{'pgm'}   = $ext{'PGM'}   = 'image/portable-graymap';
$ext{'ppm'}   = $ext{'PPM'}   = 'image/portable-pixmap';
$ext{'ps'}    = $ext{'PS'}    = 'application/postscript';
$ext{'ras'}   = $ext{'RAS'}   = 'image/cmu-raster';
$ext{'rgb'}   = $ext{'RGB'}   = 'image/x-rgb';
$ext{'rtf'}   = $ext{'RTF'}   = 'application/x-rtf';
$ext{'snd'}   = $ext{'SND'}   = 'audio/basic';
$ext{'tex'}   = $ext{'TEX'}   = 'application/tex';
$ext{'texi'}  = $ext{'TEXI'}  = 'application/texinfo';
$ext{'text'}  = $ext{'TEXT'}  = 'text/plain';
$ext{'tif'}   = $ext{'TIF'}   = 'image/x-tiff';                 # tiff???
$ext{'tiff'}  = $ext{'TIFF'}  = 'image/x-tiff';
$ext{'txt'}   = $ext{'TXT'}   = 'text/plain';
$ext{'x11'}   = $ext{'X11'}   = 'image/x11-dump';
$ext{'xbm'}   = $ext{'XBM'}   = 'image/xbitmap';                # x-bitmap???
$ext{'xwd'}   = $ext{'XWD'}   = 'image/xwindowdump';
$ext{'shar'}  = $ext{'SHAR'}  = 'archive/shar';
$ext{'tar'}   = $ext{'TAR'}   = 'archive/tar';

#
# MIME Content-encoding: x-compress x-zip x-uuencode
#
$encoding{'uu'} = $encoding{'UU'} = 'x-uuencode';
$encoding{'z'}  = 'x-zip';
$encoding{'Z'}  = 'x-compress';

    +--+
    |  |____   --------------------------------------------------------------
  __|       |  Tony Sanders                  Development and Customer Support
  \         |  sanders@BSDI.COM              Berkeley Software Design, Inc.
   \/\  * _/                                 1801 Wells Branch Parkway, #2111
      \_ /                                   Austin, TX  78728
        \|