home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
srev13h.zip
/
MEDIATYP.RX0
< prev
next >
Wrap
Text File
|
1999-09-24
|
3KB
|
76 lines
/* 28 August 1999: User defined mimetypes
SRE-http uses the entries in here to determine a mimetype, using
and "extension-to-mimetype" mapping.
If no match is found here, then the defaults (in MEDIATYP.SRF) are used.
You can add entries to this file using two different styles:
1) Old style (pre ver 1.3b.1298a
known.xxx = 'type/subtype'
For example:
known.listing = 'text/plain'
Which means: all files with a .listing extension are treated as text/plain mimetype.
For more complicated extensions (containing non-alphanumeric characters)
you should use 2 statements:
tmp1='AN-EXTENSION' ; known.tmp1='type/subtype'
For example:
tmp1='HTML-SSI' ; known.tmp1='text/html'
CAUTION: The value of the "tmp1" variable must be capitalized
2) New style (1.3b.1298a and above)
type=type/subtype exts=ext1,ext2,...,extn
Or, to specify "host specific" entries, use
type.host_nickanme=type/subtype
Examples:
type=text/plain exts=C,FOR,PAS,ASM,BAS
(which means:
all files with extensions of .C, .FOR, .PASC, .ASM, and .BAS are
assumed have a mimetype of text/plain.)
type.hersite=text/plain exts=DOC
type.hissite=application/msword exts=DOC
(which means::
.DOC requests to the hersite host are text/plain
.DOC requests to the hissite host are application/msword)
WARNING: the order of entries in MEDIATYP.RXX matters! That is,
later entries can override earlier entries.
Example:
type.mysite=text/plain exts=DOC
type=application/msword exts=DOC
will cause all .DOC requests to be application/msword (since
the default entry comes after the host-specific entry).
Notes:
* To set the default (no extension) type, set KNOWN.='type/subtype'
* You can intermix both styles
* The case of the type/subtype is retained (it's value is returned to
the client in a Content-Type response header).
* See SREHTTP.FAQ for a discussion of other ways of setting mimetypes.
* The list of "default" mimetypes is contained in the MEDIATYP.SRF file,
which is in SRE-http's LIB directory).
* Tech note: SRE-http parses this file and creates MEDIATYP.TMP in the
SRE-http "temporary data" directory (i.e.; \GOSERVE\TEMP).
Hence, MEDIATYP.TMP is used by SRE-http (it is read and "interpreted").
As with other SRE-http parameters, MEDIATYP.TMP is regenerated
whenever MEDIATYP.RXX changes (SRE-http checks about every 15 seconds
for changes to parameter files).
* To use this file only when a default match can not be found, please
the discussion of SREFMON.CMD's MEDIATYPE_FILE_ALWAYS parameter
in INITFILT.DOC.
* To specify host specific entries, you must use the "new style" entry
syntax.
*/
tmp1='HTML-SSI'
known.tmp1='text/html'
type=text/html exts=HTM-SSI
known.listing='text/plain'