Hi again Thierry,

Le 16/04/2014 16:34, Thierry FOURNIER a écrit :
Shouldn't we need to provide a matching method (for example "-m str") ?
In this case, the "language" documentation also needs to be updated.


Fixed.

Great !
haproxy becomes fun and enlarges Y0ur creativity (dedicated to the "spam" thread ;-) ).

Look at this :
use_backend bk_%[req.fhdr(accept-language),language(de;es;fr;en),map(language.map,en)] if TRUE

Where language.map contains :
fr fr
en en
us en
de de

Unfortunately, currently we can't benefit from the default value declared in the map. This is because sample_conv_q_prefered returns 0 when no matching language was found. In this case, map() is not called.

Is it possible to always return 1 ?


--
Cyril Bonté

Reply via email to