httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Malo ...@perlig.de>
Subject Re: make mod_negotiation more configurable
Date Fri, 24 Jan 2003 22:56:39 GMT
* André Malo wrote:

> I'm planning to apply some request dependent extensions to mod_negotiation.
> The first is ready-to-commit :) but I'd like to hear some comments about
> them in general.
> The main goal is to make some configuration cases more simple.

Just sending a ping for those who may have overlooked the mail. Fullquote 
without attachments follows:

> The attached patch (mod_negotiation.c.patch) introduces a new special
> variable "prefer-language" which influences mod_negotiation in that way,
> that it first tries to select only variants that have the specified
> language tag. If no success, it tries negotiation again with all variants.
> A more readable patch (without the addional indentation) is also attached.
> 
> This allows, however, cool configurations like the following:
> 
> AliasMatch ^/manual(?:/(?:de|en|ja|pt-br|ru))?(/.*)? \
>             /path/to/manual$1
> 
> <Directory "/path/to/manual">
>   [...normal stuff...]
> 
> # would be nice, but isn't supported yet:
> #    SetEnvIf Request_URI ^/manual/(de|en|ja|pt-br|ru)/ \
> #               prefer-language=$1
> 
>     SetEnvIf Request_URI ^/manual/de/    prefer-language=de
>     SetEnvIf Request_URI ^/manual/en/    prefer-language=en
>     SetEnvIf Request_URI ^/manual/ja/    prefer-language=ja
>     SetEnvIf Request_URI ^/manual/pt-br/ prefer-language=pt-br
>     SetEnvIf Request_URI ^/manual/ru/    prefer-language=ru
> </Directory>
> 
> As you may guess, it would be very useful for the distributed documentation
> (there are/were already some discussions about the problem). So I'd also
> propose a backport to 2.0.
> 
> The next step would be to make mod_negotiation recognize "no-gzip" and
> "gzip-only-text/html", too. In fact, I had an early patch for that (which
> dropped encoded variants entirely from the list), but I think, if it's
> implemented similar to the "prefer-language" code, it's much better.
> 
> Any comments, suggestions or objections?
> If not, I'm going to commit the stuff :)
> 
> nd
-- 
Wenn nur Ingenieure mit Diplom programmieren würden, hätten wir
wahrscheinlich weniger schlechte Software.
Wir hätten allerdings auch weniger gute Software.
                                   -- Felix von Leitner in dasr

Mime
View raw message