HAProxy cuts parameter in log output

Good day everyone!

I’m migrated from haproxy 1.5 to 1.7.11 and I have some troubles with logging

I have a following in config file for logging

capture request header Host len 200
capture request header Referer len 200
capture request header User-Agent len 200
capture request header Content-Type len 200
capture request header Cookie len 300
log-format %[capture.req.hdr(0),lower]\ %ci\ -\ [%t]\ “%HM\ %HP\ %HV”\ %ST\ “%[capture.req.hdr(3)]”\ %U\ “%[capture.req.hdr(1)]”\ “%[capture.req.hdr(2)]”\ “%[capture.req.hdr(4)]”\ %Tq\ “%s”\ ‘NGINX-CACHE-- “-”’\ "%ts\»

Logformat is almost the same with Nginx

But is some cases it works incorrectly

For example log output

Nov 20 10:41:56 lb.loc haproxy[12633]: example.com 81.4.227.173 - [20/Nov/2019:10:41:56.095] “GET /piwik.php H” 200 “-” 2396 “https://example.com/” “Mozilla/5.0” “some.cookie data” 19 “vm06.lb.loc” NGINX-CACHE-- “-” “—”

Problem is that “GET /piwik.php H” must be “GET /piwik.php HTTP/1.1”
its %HV parameter in log-format

A part of “HTTP/1.1” randomly cut’s off. It may be “HT” or “HTT” or “HTTP/1.”

Mailing list:

https://www.mail-archive.com/haproxy@formilux.org/msg35426.html