mod_negotiation.html revision 3d76f0e292da6a107829fbe83f98b8c0985c6ddb
d14b45df33b70c47b6eab2507de958c04711f38cvboxsync<!--%hypertext -->
d14b45df33b70c47b6eab2507de958c04711f38cvboxsync<!--/%hypertext -->
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsyncThis module is contained in the <code>mod_negotiation.c</code> file, and
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsyncis compiled in by default. It provides for
a16eb14ad7a4b5ef91ddc22d3e8e92d930f736fcvboxsync<A HREF="content-negotiation.html">content negotiation</A>. Any document with
d14b45df33b70c47b6eab2507de958c04711f38cvboxsyncmime type <code>application/x-type-map</code> will be processed by this module.
d14b45df33b70c47b6eab2507de958c04711f38cvboxsync<!--%plaintext <?INDEX {\tt application/x-type-map} mime type> -->
d14b45df33b70c47b6eab2507de958c04711f38cvboxsyncContent negotiation, or more accurately content selection, is the
d14b45df33b70c47b6eab2507de958c04711f38cvboxsyncselection of the document that best matches the clients
d14b45df33b70c47b6eab2507de958c04711f38cvboxsynccapabilities, from one of several available documents.
38008ff8bc90d3bb27eb0ad412de498be8563439vboxsyncThere are two implementations of this.
38008ff8bc90d3bb27eb0ad412de498be8563439vboxsync<li> A type map (a file with the mime type <code>application/x-type-map</code>)
38008ff8bc90d3bb27eb0ad412de498be8563439vboxsyncwhich explicitly lists the files containing the variants.
38008ff8bc90d3bb27eb0ad412de498be8563439vboxsync<li> A MultiViews search (enabled by the MultiViews
38008ff8bc90d3bb27eb0ad412de498be8563439vboxsync<A HREF="core.html#options">Option</A>, where the server does an implicit
38008ff8bc90d3bb27eb0ad412de498be8563439vboxsyncfilename pattern match, and choose from amongst the results.
38008ff8bc90d3bb27eb0ad412de498be8563439vboxsyncA type map has the same format as RFC822 mail headers. It contains document
38008ff8bc90d3bb27eb0ad412de498be8563439vboxsyncdescriptions separated by blank lines, with lines beginning with a hash
38008ff8bc90d3bb27eb0ad412de498be8563439vboxsynccharacter ('#') treated as comments. A document description consists of
38008ff8bc90d3bb27eb0ad412de498be8563439vboxsyncseveral header records; records may be continued on multiple lines if the
38008ff8bc90d3bb27eb0ad412de498be8563439vboxsynccontinuation lines start with spaces. The leading space will be deleted
058111e7e5eb77a9cfa404836d685f4eec4eeef3vboxsyncand the lines concatenated. A header record consists of a keyword
d14b45df33b70c47b6eab2507de958c04711f38cvboxsyncname, which always ends in a colon, followed by a value. Whitespace is allowed
d14b45df33b70c47b6eab2507de958c04711f38cvboxsyncbetween the header name and value, and between the tokens of value.
d14b45df33b70c47b6eab2507de958c04711f38cvboxsyncallowed are:
d14b45df33b70c47b6eab2507de958c04711f38cvboxsync<dt>Content-Encoding:
d14b45df33b70c47b6eab2507de958c04711f38cvboxsync<dd>The encoding of the file. Currently only two encodings are recognised
d14b45df33b70c47b6eab2507de958c04711f38cvboxsyncby http; <code>x-compress</code> for compressed files, and <code>x-gzip</code>
d14b45df33b70c47b6eab2507de958c04711f38cvboxsyncfor gzipped files.
d14b45df33b70c47b6eab2507de958c04711f38cvboxsync<dt>Content-Language:
d14b45df33b70c47b6eab2507de958c04711f38cvboxsync<dd>The language of the variant, as an Internet standard language code, such
d292438512fae43184049e5354a9d74788a135edvboxsync<dt>Content-Length:
d292438512fae43184049e5354a9d74788a135edvboxsync<dd>The length of the file, in bytes. If this header is not present, then
058111e7e5eb77a9cfa404836d685f4eec4eeef3vboxsyncthe actual length of the file is used.
058111e7e5eb77a9cfa404836d685f4eec4eeef3vboxsync<dt>Content-Type:
058111e7e5eb77a9cfa404836d685f4eec4eeef3vboxsync<dd>The MIME media type of the document, with optional parameters.
058111e7e5eb77a9cfa404836d685f4eec4eeef3vboxsyncparameters are separated from the media type and from one another by
058111e7e5eb77a9cfa404836d685f4eec4eeef3vboxsyncsemi-colons. Parameter syntax is name=value; allowed parameters are:
d14b45df33b70c47b6eab2507de958c04711f38cvboxsync<dd>the value is an integer, which specifies the version of the media type.
d14b45df33b70c47b6eab2507de958c04711f38cvboxsyncFor <code>text/html</code> this defaults to 2, otherwise 0.
d14b45df33b70c47b6eab2507de958c04711f38cvboxsync<dd>the value is a floating-point number with value between 0. and 1.
d14b45df33b70c47b6eab2507de958c04711f38cvboxsyncIt indications the 'quality' of this variant.