Hi Guillaume,

Le 04/09/2014 11:56, Guillaume Castagnino a écrit :
Hi,

It seems that there is an issue with http-send-name-header. I can
reproduce with 1.4.25, but not 1.5.

Sometime it works as expected, and sometime the Header is corrupted


The conf:
listen 6c353edc-32b2-11e4-abba-0800272e3d2e 127.0.0.100:10002
    balance roundrobin
    mode http
    timeout connect 30000
    timeout client 30000
    timeout server 30000
    option http-server-close
    option redispatch
    reqidel ^Host:
    http-send-name-header Host
    option httpchk HEAD / HTTP/1.0\r\nHost:\ 127.0.0.1
    stats enable
    stats uri /haproxy?stats
    server 192.168.56.1:81 192.168.56.1:81    cookie SLB1   weight 100
maxconn 1000   check inter 2000 fastinter 1000 downinter 5000 fall 2
rise 3
    server 192.168.56.2:81 192.168.56.1:82    cookie SLB2   weight 100
maxconn 1000   check inter 2000 fastinter 1000 downinter 5000 fall 2
rise 3





When the header is corrupted, the HTTP request looks like this (tcpdump
captured). Look at the wonderfull Host header:
GET / HTTP/1.1
Host: 1GET / HTTP/1.1
User-Agent: curl/7.37.1
Accept: */*
X-Forwarded-For: 192.168.56.1
X-Forwarded-Host: daos-dev
X-Forwarded-Server: daos-dev
Connection: close



The corruption is cyclic: I have 3 request OK, then 3 corrupted, then 3
OK again, then 3 failed, etc…

Indeed, I could reproduce the issue in 100% of my tests, sending 2 requests with keep-alive enabled.

In case it helps to track the issue, I could simplify the configuration up to :
  listen test :10002
    balance roundrobin
    mode http
    option http-server-close
    http-send-name-header Host
    server server-name 127.0.0.1:80

then, to reproduce the issue :
$ echo -ne "GET / HTTP/1.1\r\nHost: test\r\n\r\nGET / HTTP/1.1\r\nHost: test\r\n\r\n" | nc localhost 10002


--
Cyril Bonté

Reply via email to