in reply to Language Negotiation with mod_perl, Apache
From the Apache 1.3 documentation:
If some of the variants for a particular resource have a language attribute, and some do not, those variants with no language are given a very low language quality factor of 0.001.
The reason for setting this language quality factor for variant with no language to a very low value is to allow for a default variant which can be supplied if none of the other variants match the browser's language preferences. This allows you to avoid users seeing a "406" error page if their browser is set to only accept languages which you do not offer for the ressource that was requested.
For example, consider the situation with Multiviews enabled and three variants:
The meaning of a variant with no language is that it is always acceptable to the browser. If the request is for foo and the Accept-Language header includes either en or fr (or both) one of foo.en.html or foo.fr.html will be returned. If the browser does not list either en or fr as acceptable, foo.html will be returned instead. If the client requests foo.html instead, then no negotation will occur since the exact match will be returned. To avoid this problem, it is sometimes helpful to name the "no language" variant foo.html.html to assure that Multiviews and language negotiation will come into play.
Wouldn't that solve your problem, rather than fiddling with the headers in the request?CountZero
"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re[2]: Language Negotiation with mod_perl, Apache
by penguinfuz (Pilgrim) on Jan 31, 2003 at 10:01 UTC | |
by CountZero (Bishop) on Jan 31, 2003 at 11:07 UTC |