From: Christopher Faulet Date: Thu, 13 Dec 2018 20:58:18 +0000 (+0100) Subject: BUG/MINOR: proto_htx: Fix htx_res_set_status to also set the reason X-Git-Tag: v1.9-dev11~42 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=87a2c0d3f41d7eed037b1305e75effaa7a42be65;p=thirdparty%2Fhaproxy.git BUG/MINOR: proto_htx: Fix htx_res_set_status to also set the reason Becaue the check on the return value of the function http_replace_res_status was done upside down, no reason was never set. --- diff --git a/src/proto_htx.c b/src/proto_htx.c index 6c637cb834..b4bc3970db 100644 --- a/src/proto_htx.c +++ b/src/proto_htx.c @@ -2727,7 +2727,7 @@ void htx_res_set_status(unsigned int status, const char *reason, struct stream * if (reason == NULL) reason = http_get_reason(status); - if (!http_replace_res_status(htx, ist2(trash.area, trash.data))) + if (http_replace_res_status(htx, ist2(trash.area, trash.data))) http_replace_res_reason(htx, ist2(reason, strlen(reason))); }