From: Christopher Faulet Date: Fri, 24 Jan 2020 18:16:26 +0000 (+0100) Subject: BUG/MINOR: http-ana: Set HTX_FL_PROXY_RESP flag if a server perform a redirect X-Git-Tag: v2.2-dev2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c20afb810f9368b026f2fea9640d04a004087f19;p=thirdparty%2Fhaproxy.git BUG/MINOR: http-ana: Set HTX_FL_PROXY_RESP flag if a server perform a redirect It is important to not forget to specify the HTX resposne was internally generated when a server perform a redirect. This information is used by the H1 multiplexer to choose the right connexion mode when the response is sent to the client. This patch must be backported to 2.1. --- diff --git a/src/http_ana.c b/src/http_ana.c index eac5944bae..a7e8abf7bb 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -4254,6 +4254,8 @@ void http_perform_server_redirect(struct stream *s, struct stream_interface *si) if (!htx_add_endof(htx, HTX_BLK_EOH) || !htx_add_endof(htx, HTX_BLK_EOM)) goto fail; + htx_to_buf(htx, &res->buf); + htx->flags |= HTX_FL_PROXY_RESP; /* * Send the message */