I know I can capture 6 bytes length packet using this config:
global
log /dev/log local0 debug
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
daemon
defaults
log global
mode tcp
timeout client 10m
timeout connect 10s
timeout server 10m
backend talk_0
server stupid_0 example.com:80
frontend listen_0
mode tcp
option tcplog
bind :12345
default_backend talk_0
tcp-request inspect-delay 5s
tcp-request content capture req.payload(0,6) len 6
log-format %[capture.req.hdr(0)]
However, I can't figure out how to capture full packet without knowing its length. Is it possible using haproxy? If yes, how to do it?