]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: http-rules: Add wait-for-body action on request and response side
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 29 Mar 2021 08:46:38 +0000 (10:46 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 1 Apr 2021 14:27:40 +0000 (16:27 +0200)
commit021a8e4d7bcd1687f24186435ddfc6e7a79f335b
treeaa1ea33ddf11fdfef9e4d8e3fec1579f9160e978
parent581db2b829d84d1086423c6713aa473ff66783be
MEDIUM: http-rules: Add wait-for-body action on request and response side

Historically, an option was added to wait for the request payload (option
http-buffer-request). This option has 2 drawbacks. First, it is an ON/OFF
option for the whole proxy. It cannot be enabled on demand depending on the
message. Then, as its name suggests, it only works on the request side. The
only option to wait for the response payload was to write a dedicated
filter. While it is an acceptable solution for complex applications, it is a
bit overkill to simply match strings in the body.

To make everyone happy, this patch adds a dedicated HTTP action to wait for
the message payload, for the request or the response depending it is used in
an http-request or an http-response ruleset. The time to wait is
configurable and, optionally, the minimum payload size to have before stop
to wait.

Both the http action and the old http analyzer rely on the same internal
function.
doc/configuration.txt
include/haproxy/http_ana.h
src/http_act.c
src/http_ana.c