Hi Cyril, On Tue, Nov 24, 2015 at 10:58:47PM +0100, Cyril Bonté wrote: > Currently, haproxy won't match an url parameter if its value is empty. I > tend to think it should : an empty value is different from not providing > the parameter at all. > > The function "find_next_url_param()" should unconditionally return "1" > when a parameter is found, instead of "value_end != value_start" : > http://www.haproxy.org/git?p=haproxy.git;a=blob;f=src/proto_http.c;h=77a52078d0d0d458ed7f0233dfda87eca247d2c2;hb=HEAD#l11661 > > This would allow some rules like : > acl LANG_FR_NONE urlp_reg(lang) ^(fr)?$ > acl LANG_EN urlp(lang) en > > http-request redirect location / if { path / } LANG_FR_NONE > http-request redirect location /en if { path / } LANG_EN > > > If it's ok for everyone, I can provide a small patch (which will also > fix some invalid code comments on top of this function).
I totally agree with you, and BTW your proposal is the only way to make "url_p(lang) -m found" work. So you've found a real bug. Thanks, Willy