BUG/MINOR: http-fetch: Fix smp_fetch_body() when called from a health-check
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 25 Nov 2020 07:08:08 +0000 (08:08 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 27 Nov 2020 09:30:23 +0000 (10:30 +0100)
commita9ffc416377e0df9859526dc3c1d769c6a68636f
tree51eb0acbddba5f7f8ce1c7e490124b0dc7068059
parent687a68e2d04900e84317d066de80891a7f848747
BUG/MINOR: http-fetch: Fix smp_fetch_body() when called from a health-check

res.body may be called from a health-check. It is probably never used. But it is
possibe. In such case, there is no channel. Thus we must not use it
unconditionally to set the flag SMP_F_MAY_CHANGE on the smp.

Now the condition test the channel first. In addtion, the flag is not set if the
payload is fully received.

This patch must be backported as far as 2.2.
src/http_fetch.c