Stats CSV page: curl: (18) transfer closed with outstanding read data remaining

Greetings,

I’m running the latest HAProxy 2.4.2 here with a quite simple configuration for a stats page:

# Stats Page
frontend stats-front
  bind *:8080
  mode http
  default_backend stats-back

backend stats-back
  acl admin_access src  # list of internal ip addresses
  log global
  mode http
  stats admin if admin_access
  stats auth XXX:XXX
  stats enable
  stats refresh 10s
  stats show-legends
  stats show-node
  stats uri /haproxy/stats

We have a monitoring check for Icinga2 written in Python, using the Python Requests library which fails sporadically. Whenever this is the case, the curl command on the command line fails as well with the message curl: (18) transfer closed with outstanding read data remaining, even if the output looks quite complete compared to echo "show stat" | nc -U /run/haproxy/admin.sock.

Now I’m wondering if I’m missing something or if this probably could be a bug?

Thanks in advance for any support & Regards,
Dominic