From: Rich Bowen Date: Mon, 3 Sep 2001 03:45:27 +0000 (+0000) Subject: Added a little more detail to the docs based on some comments from Bill X-Git-Tag: 2.0.26~336 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d3c7404f6b0da8836a8bb3ef0a802538d91ee9b4;p=apache Added a little more detail to the docs based on some comments from Bill Rowe. More to come, but this clarified a point that I had to track down earlier, and may save someone some time. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90878 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/content-negotiation.html b/docs/manual/content-negotiation.html index d1b4ab20ab..a813fcf8c9 100644 --- a/docs/manual/content-negotiation.html +++ b/docs/manual/content-negotiation.html @@ -114,16 +114,17 @@ file suffix as type-map; this is best done with a AddHandler type-map .var -in the server configuration file. See the comments in the sample config -file for more details.

+in the server configuration file.

-Type map files have an entry for each available variant; these entries +Type map files should have the same name as the resource which they are +describing, and have an entry for each available variant; these entries consist of contiguous HTTP-format header lines. Entries for different variants are separated by blank lines. Blank lines are illegal within an entry. It is conventional to begin a map file with an entry for the combined entity as a whole (although this is not required, and if present will be ignored). An example -map file is: +map file is shown below. This file would be named foo.html, +as it describes a resource named foo.

   URI: foo
@@ -137,6 +138,9 @@ map file is:
   Content-language: fr, de
 
+Note also that a typemap file will take precedence over the filename's +extension, even when Multiviews is on. + If the variants have different source qualities, that may be indicated by the "qs" parameter to the media type, as in this picture (available as jpeg, gif, or ASCII-art): @@ -196,7 +200,7 @@ The full list of headers recognized is: for compress'd files, and x-gzip for gzip'd files. The x- prefix is ignored for encoding comparisons.
Content-Length: -
The size of the file. Specifying content +
The size of the file in bytes. Specifying content lengths in the type-map allows the server to compare file sizes without checking the actual files.
Description: @@ -206,6 +210,11 @@ The full list of headers recognized is: list will include the human-readable variant descriptions. +Using a type map file is preferred over MultiViews because +it requires less CPU time, and less file access, to parse a file +explicitly listing the various resource variants, than to have to look +at every matching file, and parse its file extensions. +

Multiviews

@@ -485,7 +494,8 @@ quality factors to 5 decimal places before choosing the best variant. If you are using language negotiation you can choose between different naming conventions, because files can have more than one extension, and the order of the extensions is normally irrelevant -(see mod_mime documentation for details). +(see the mod_mime +documentation for details).

A typical file has a MIME-type extension (e.g., html), maybe an encoding extension (e.g., gz), and of course a diff --git a/docs/manual/content-negotiation.html.en b/docs/manual/content-negotiation.html.en index d1b4ab20ab..a813fcf8c9 100644 --- a/docs/manual/content-negotiation.html.en +++ b/docs/manual/content-negotiation.html.en @@ -114,16 +114,17 @@ file suffix as type-map; this is best done with a AddHandler type-map .var -in the server configuration file. See the comments in the sample config -file for more details.

+in the server configuration file.

-Type map files have an entry for each available variant; these entries +Type map files should have the same name as the resource which they are +describing, and have an entry for each available variant; these entries consist of contiguous HTTP-format header lines. Entries for different variants are separated by blank lines. Blank lines are illegal within an entry. It is conventional to begin a map file with an entry for the combined entity as a whole (although this is not required, and if present will be ignored). An example -map file is: +map file is shown below. This file would be named foo.html, +as it describes a resource named foo.

   URI: foo
@@ -137,6 +138,9 @@ map file is:
   Content-language: fr, de
 
+Note also that a typemap file will take precedence over the filename's +extension, even when Multiviews is on. + If the variants have different source qualities, that may be indicated by the "qs" parameter to the media type, as in this picture (available as jpeg, gif, or ASCII-art): @@ -196,7 +200,7 @@ The full list of headers recognized is: for compress'd files, and x-gzip for gzip'd files. The x- prefix is ignored for encoding comparisons.
Content-Length: -
The size of the file. Specifying content +
The size of the file in bytes. Specifying content lengths in the type-map allows the server to compare file sizes without checking the actual files.
Description: @@ -206,6 +210,11 @@ The full list of headers recognized is: list will include the human-readable variant descriptions. +Using a type map file is preferred over MultiViews because +it requires less CPU time, and less file access, to parse a file +explicitly listing the various resource variants, than to have to look +at every matching file, and parse its file extensions. +

Multiviews

@@ -485,7 +494,8 @@ quality factors to 5 decimal places before choosing the best variant. If you are using language negotiation you can choose between different naming conventions, because files can have more than one extension, and the order of the extensions is normally irrelevant -(see mod_mime documentation for details). +(see the mod_mime +documentation for details).

A typical file has a MIME-type extension (e.g., html), maybe an encoding extension (e.g., gz), and of course a