home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / srev13h.zip / MEDIATYP.RX0 < prev    next >
Text File  |  1999-09-24  |  3KB  |  76 lines

  1. /* 28 August 1999: User defined mimetypes
  2.  
  3.    SRE-http uses the entries in here to determine a mimetype, using
  4.    and "extension-to-mimetype" mapping.
  5.    If no match is found here, then the defaults (in MEDIATYP.SRF) are used.
  6.  
  7.  
  8.   You can add entries to this file using two different styles:
  9.  
  10.   1) Old style (pre ver 1.3b.1298a
  11.            known.xxx  =  'type/subtype'
  12.      For example:
  13.           known.listing = 'text/plain'
  14.       Which means: all files with a .listing extension are treated as text/plain mimetype.
  15.  
  16.       For more complicated extensions (containing non-alphanumeric characters)
  17.       you should use 2 statements:
  18.             tmp1='AN-EXTENSION' ; known.tmp1='type/subtype'
  19.       For example:
  20.           tmp1='HTML-SSI' ; known.tmp1='text/html'
  21.       CAUTION: The value of the  "tmp1" variable must be capitalized
  22.  
  23.   2) New style (1.3b.1298a and above)
  24.         type=type/subtype  exts=ext1,ext2,...,extn
  25.      Or, to specify "host specific" entries, use 
  26.          type.host_nickanme=type/subtype
  27.  
  28.      Examples:
  29.        type=text/plain  exts=C,FOR,PAS,ASM,BAS
  30.          (which means: 
  31.             all files with extensions of .C, .FOR, .PASC, .ASM, and .BAS are
  32.             assumed have a mimetype of text/plain.)
  33.        
  34.        type.hersite=text/plain exts=DOC
  35.        type.hissite=application/msword exts=DOC
  36.          (which means:: 
  37.              .DOC requests to the hersite host are text/plain 
  38.              .DOC requests to the hissite host are application/msword)
  39.  
  40.   WARNING: the order of entries in MEDIATYP.RXX matters! That is,
  41.            later entries can override earlier entries.
  42.  
  43.         Example:
  44.                 type.mysite=text/plain exts=DOC
  45.                 type=application/msword exts=DOC
  46.            will cause all .DOC requests to be application/msword (since
  47.            the default entry comes after the host-specific entry).
  48.         
  49.  Notes:
  50.     * To set the default (no extension) type, set KNOWN.='type/subtype'
  51.     * You can intermix both styles
  52.     * The case of the type/subtype is retained (it's value is returned to
  53.       the client in a Content-Type response header).
  54.     * See SREHTTP.FAQ for a discussion of other ways of setting mimetypes.
  55.     * The list of "default" mimetypes is contained in the MEDIATYP.SRF file,
  56.       which is in SRE-http's LIB directory).
  57.     * Tech note: SRE-http parses this file and creates MEDIATYP.TMP in the
  58.       SRE-http "temporary data" directory (i.e.; \GOSERVE\TEMP).  
  59.       Hence, MEDIATYP.TMP is used by SRE-http (it is read and "interpreted").
  60.       As with other SRE-http parameters, MEDIATYP.TMP is regenerated
  61.       whenever MEDIATYP.RXX changes (SRE-http checks about every 15 seconds
  62.       for changes to parameter files).
  63.     * To use this file only when a default match can not be found, please
  64.       the discussion of SREFMON.CMD's MEDIATYPE_FILE_ALWAYS parameter
  65.       in INITFILT.DOC.
  66.     * To specify host specific entries, you must use the "new style" entry
  67.       syntax.
  68.  
  69.    
  70. */
  71. tmp1='HTML-SSI'
  72. known.tmp1='text/html'
  73. type=text/html exts=HTM-SSI
  74. known.listing='text/plain'
  75.  
  76.