]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: http/applet: Finish request processing when a service is registered
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 4 Jul 2019 09:27:15 +0000 (11:27 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 5 Jul 2019 12:26:14 +0000 (14:26 +0200)
commit8f1aa77b423b85012c062149f16ceb8f3aacefea
treea40e823a26bb88d381c8d028a1a14d70889db867
parent2e4843d1d200210e0b11fdc71991f089103e2a60
BUG/MEDIUM: http/applet: Finish request processing when a service is registered

In the analyzers AN_REQ_HTTP_PROCESS_FE/BE, when a service is registered, it is
important to not interrupt remaining processing but just the http-request rules
processing. Otherwise, the part that handles the applets installation is
skipped.

Among the several effects, if the service is registered on a frontend (not a
listen), the forwarding of the request is skipped because all analyzers are not
set on the request channel. If the service does not depends on it, the response
is still produced and forwarded to the client. But the stream is infinitly
blocked because the request is not fully consumed. This issue was reported on
Github, see #151.

So this bug is fixed thanks to the new action return ACT_RET_DONE. Once a
service is registered, the action process_use_service() still returns
ACT_RET_STOP. But now, only rules processing is stopped. As a side effet, the
action http_action_reject() must now return ACT_RET_DONE to really stop all
processing.

This patch must be backported to 2.0. It depends on the commit introducing the
return code ACT_RET_DONE.
src/hlua.c
src/http_act.c
src/proto_http.c
src/proto_htx.c