Hi Daniel,

Daniel Schneller wrote:
> root@haproxy-1:~# curl -s http://127.0.0.1:8881
> Aug  1 15:12:55 haproxy-1 haproxy[3049]: 127.0.0.1:45875 
> [01/Aug/2017:15:12:55.198] "0"
> 
> While the first three are expected, the last one confuses me. Why would 
> leaving the header out result in “0” being logged?

Because the header is not left out in your request. Instead, the raw
request is sent as follows

GET / HTTP/1.1
Host: 127.0.0.1:8881
User-Agent: curl/7.43.0
Accept: */*

The HTTP 1.1 specification requires that a Host header is always sent
along with the request. Curl specifically always sends the host from the
given URL, unless it was explicitly overwritten.

Thus, in your case the fetch extracts the second part from the given IP
address, which is 0 in your case.

Regards,
Holger

Reply via email to