Hi Willy and Hank,

Le jeudi 25 novembre 2010 07:10:20, Willy Tarreau a écrit :
> Cyril, Hank is right, there's a bug. Here's how I can reproduce it with
> both 1.4.9 and 1.5-dev3:
> 
> Config :
> listen echo
>         bind    :8000
>         mode    http
>         option  http-server-close
>         timeout client  50s
>         timeout server  50s
>         timeout connect 50s
>         server  srv 127.0.0.1:8001
>         reqidel ^X
>         reqidel ^Via:
> 
> Request sent:
> $ printf "GET / HTTP/1.0\r\nX-truc1: blah\r\nX-truc2: blah\r\nVia:
> here\r\nX-truc3: blah\r\nVia: there\r\nNon-X: blah\r\n\r\n" | nc 0 8000
> 
> Request received:
> $ nc -lp8001
> GET / HTTP/1.0
> Via: here
> Via: there
> Non-X: blah

Oh I see, I didn't understand the issue like this.

> If I switch the two reqidel lines, I don't have the problem anymore.

But if you add a second Via header before X-truc3, this X-truc3 won't be 
removed.

> If I remove only one of the first X-truc headers, it's OK too. I suspect
> that the removal of more than one headers from the beginning prevents
> the remaining first header from being matched by next rule :-/

Not only the first one.
With this order :
        reqidel ^Via:
        reqidel ^X

and this request :
printf "GET / HTTP/1.0\r\nX-truc1: blah\r\nX-truc2: blah\r\nVia: here\r\nVia: 
here\r\nX-truc3: blah\r\nX-truc4: blah\r\nX-truc5: blah\r\nX-truc6: 
blah\r\nVia: there\r\nNon-X: blah\r\n\r\n"

X-truc3, X-truc4, X-truc5, X-truc6 are not removed.
Interesting, I'll have to check some servers configurations today.

> I'll have to debug that !
> 
> Cheers,
> Willy

-- 
Cyril Bonté

Reply via email to