]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: htx: add two missing HTX_FL_EOI and remove an unexpected one
authorWilly Tarreau <w@1wt.eu>
Thu, 23 Jul 2020 04:53:27 +0000 (06:53 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 23 Jul 2020 04:53:27 +0000 (06:53 +0200)
commitf1ea47d8960730c79cc71fc634b3d7e5909d5683
tree709404b0d6c0b2374adb45f8bebe207b827021b1
parent963f701f4f8190e6c754f1c95162ec38b2597c4e
BUG/MINOR: htx: add two missing HTX_FL_EOI and remove an unexpected one

A workaround for some difficulties encountered to anticipate end of
messages was addressed by commit 810df0614 ("MEDIUM: htx: Add a flag on
a HTX message when no more data are expected"), but there were 3 issues
in it (with minor impact):
  - the flag was mistakenly set before an EOH in Lua, which would only
    cause incomplete packets to be emitted for now but could cause
    truncated responses in the future. It's not needed to add it on
    the next EOM block as http_forward_proxy_resp() already does it.

  - one was still missing in hlua_applet_http_fct(), possibly causing
    delays on Lua services

  - one was missing in the Prometheus exporter.

All this simply shows that this mechanism is still quite fragile and
not trivial to use, especially in order to deal with the impossibility
to append the EOM, so we'll need to improve the solution in the future
and future backports should not be completely ruled out.

This fix must be backported where the patch above is backported,
typically 2.1 and later as it was required for a set of fixes.
contrib/prometheus-exporter/service-prometheus.c
src/hlua.c