mod_negotiation.html revision 1974a700e8a7afa11e008101503b014213aa9c17
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass BGCOLOR="#FFFFFF"
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass TEXT="#000000"
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass LINK="#0000FF"
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass VLINK="#000080"
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass ALINK="#FF0000"
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<!--#include virtual="header.html" -->
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav GlassHREF="/content-negotiation.html">content negotiation</A>.</p>
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav GlassHREF="module-dict.html#SourceFile"
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass><STRONG>Source File:</STRONG></A> mod_negotiation.c
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav GlassHREF="module-dict.html#ModuleIdentifier"
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass><STRONG>Module Identifier:</STRONG></A> negotiation_module
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav GlassContent negotiation, or more accurately content selection, is the
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glassselection of the document that best matches the clients
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glasscapabilities, from one of several available documents.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav GlassThere are two implementations of this.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<LI> A type map (a file with the handler <CODE>type-map</CODE>)
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glasswhich explicitly lists the files containing the variants.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<LI> A MultiViews search (enabled by the MultiViews
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<A HREF="core.html#options">Option</A>, where the server does an implicit
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glassfilename pattern match, and choose from amongst the results.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<LI><A HREF="#cachenegotiateddocs">CacheNegotiatedDocs</A>
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<LI><A HREF="#languagepriority">LanguagePriority</A>
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<A HREF="/mod_mime.html#defaultlanguage">DefaultLanguage</A>,
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<A HREF="/mod_mime.html#addencoding">AddEncoding</A>,
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<A HREF="/mod_mime.html#addlanguage">AddLanguage</A>,
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav GlassA type map has the same format as RFC822 mail headers. It contains document
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glassdescriptions separated by blank lines, with lines beginning with a hash
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glasscharacter ('#') treated as comments. A document description consists of
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glassseveral header records; records may be continued on multiple lines if the
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glasscontinuation lines start with spaces. The leading space will be deleted
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glassand the lines concatenated. A header record consists of a keyword
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glassname, which always ends in a colon, followed by a value. Whitespace is allowed
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glassbetween the header name and value, and between the tokens of value.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav GlassThe headers allowed are:
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<DT>Content-Encoding:
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<DD>The encoding of the file. Apache only recognizes encodings that are
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glassdefined by an <A HREF="mod_mime.html#addencoding">AddEncoding</A> directive.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav GlassThis normally includes the encodings <CODE>x-compress</CODE> for compress'd
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glassfiles, and <CODE>x-gzip</CODE> for gzip'd files. The <CODE>x-</CODE> prefix
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glassis ignored for encoding comparisons.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<DT>Content-Language:
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<DD>The language of the variant, as an Internet standard language tag
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass(RFC 1766). An example is <CODE>en</CODE>, meaning English.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<DT>Content-Length:
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<DD>The length of the file, in bytes. If this header is not present, then
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glassthe actual length of the file is used.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<DT>Content-Type:
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<DD>The MIME media type of the document, with optional parameters.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav GlassParameters are separated from the media type and from one another by a
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glasssemi-colon, with a syntax of <CODE>name=value</CODE>. Common parameters
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<DD>an integer specifying the version of the media type.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav GlassFor <CODE>text/html</CODE> this defaults to 2, otherwise 0.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<DD>a floating-point number with a value in the range 0.0 to 1.0,
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass indicating the relative 'quality' of this variant
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass compared to the other available variants, independent of the client's
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass capabilities. For example, a jpeg file is usually of higher source
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass quality than an ascii file if it is attempting to represent a
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass photograph. However, if the resource being represented is ascii art,
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass then an ascii file would have a higher source quality than a jpeg file.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass All qs values are therefore specific to a given resource.
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<BLOCKQUOTE><CODE>Content-Type: image/jpeg; qs=0.8</CODE></BLOCKQUOTE>
c72174b1e1e45cb0dd5a7380cae710fb25da05d4Dav Glass<DD>The path to the file containing this variant, relative to the map file.
HREF="directive-dict.html#Syntax"
HREF="directive-dict.html#Default"
HREF="directive-dict.html#Context"
HREF="directive-dict.html#Status"
HREF="directive-dict.html#Module"
HREF="directive-dict.html#Compatibility"
HREF="directive-dict.html#Syntax"
HREF="directive-dict.html#Context"
HREF="directive-dict.html#Override"
HREF="directive-dict.html#Status"
HREF="directive-dict.html#Module"
<!--#include virtual="footer.html" -->