MINOR: http-htx: Handle an optional reason when replacing the response status
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 31 Aug 2020 14:43:34 +0000 (16:43 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 1 Sep 2020 08:55:36 +0000 (10:55 +0200)
commitbde2c4c6214b427037cf06f2d5f1cf916e537a08
treed61cc862799d59802bc2dbc8279c94fd05859263
parent4b9c0d1fc08388bf44c6ebbd88f786032dd010fc
MINOR: http-htx: Handle an optional reason when replacing the response status

When calling the http_replace_res_status() function, an optional reason may now
be set. It is ignored if it points to NULL and the original reason is
preserved. Only the response status is replaced. Otherwise both the status and
the reason are replaced.

It simplifies the API and most of time, avoids an extra call to
http_replace_res_reason().
include/haproxy/http_htx.h
src/http_ana.c
src/http_htx.c