]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: filters: Count HTTP headers as filtered data but don't forward them
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 12 Feb 2020 14:31:20 +0000 (15:31 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 18 Feb 2020 10:19:57 +0000 (11:19 +0100)
commit9c44e4813cbd3c0f7ed6e2840342d45dea9ed4ff
tree35fd8f47c750a0af84470a5135a56c5bf3d90573
parent71179a3ea97ea46b28788dfab557c675ec3f3a1e
BUG/MINOR: filters: Count HTTP headers as filtered data but don't forward them

In flt_analyze_http_headers() HTTP analyzer, we must not forward systematically
the headers. We must only count them as filtered data (ie. increment the offset
of the right size). It is the http_payload callback responsibility to decide to
forward headers or not by forwarding at least 1 byte of payload. And there is
always at least 1 byte of payload to forward, the EOM block.

This patch depends on following commits:

 * MINOR: filters: Forward data only if the last filter forwards something
 * MINOR: http-htx: Add a function to retrieve the headers size of an HTX message

This patch must be backported with commits above as far as 1.9. In HAProxy 2.0
and 1.9, the patch must be adapted because of the legacy HTTP code.
src/filters.c