iTP Secure WebServer System Administrator's Guide (iTPWebSvr 5.1+)
Configuration Directives
iTP Secure WebServer System Administrator’s Guide—522659-001
A-32
Negotiation
registered code. For example, the code en-US signifies American English, and the code
fr signifies French. The client specifies the preferred language tag or tags in the Accept-
language header; if no such header appears in the request, the server uses the value or
values specified in the LanguagePreference directive. To support this feature, the target
directory must have subdirectories with names corresponding to the language tags. For
example, if the client requests a French language representation of the page
/store1/welcome, the server looks for the file in the directory /store1/fr/.
To see RFC 2068, use the following URL:
http://www.cis.ohio-state.edu/htbin/rfc/rfc2068.html
If an Accept-Language header is present, the server searches for a subdirectory that
matches a language tag in that header. To specify precedence among the tags, HTTP/1.1
defines the concept of a q value for each tag; the server searches for subdirectories in
order of descending q value. If no q values are specified, the server searches for
subdirectories in the order in which the language tags occur in the Accept-language
header.
If you specify the argument Mult, the server selects content based not only on a
language tag, but also on other headers in the request, matching the specified criteria to
file extensions (not subdirectories) in the target directory. For example, if the client
requests a French language, HTML representation of the page /store1/welcome, the
server expects the file to be named /store1/welcome.fr.html or /store1/welcome.html.fr.
If no file matches all the criteria specified in the request, the server weighs the criteria as
follows, from highest to lowest priority:
•
Content or media type (such as audio/basic, text/html) from the Accept header
•
Natural language (such as en, de) from the Accept-language header
•
Content encoding (such as compress, gzip) from the Accept-encoding header
If the request does not include an Accept-language header, the server uses the values
given in the LanguagePreference directive.
To use different content-negotiation policies in different regions of a WebServer
environment, use Negotiation as a Region command.
Default
If you omit this directive, the default value is None (no content negotiation).
Example
Assume that you specified the argument Mult and that the directory janedoe contains the
files xyz.html, xyz.en.html, and xyz.gif.
A client requests the URL /usr/janedoe/xyz with the following Accept headers:
•
Accept:image/jpeg, text/html, */*
Note. To use language as a criterion for multiview content negotiation, you must include a
LanguageSuffix directive to map each language tag to a file extension.