diff --git a/src/http_ana.c b/src/http_ana.c index be75eac44..126ffc72e 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -2417,7 +2417,7 @@ int http_apply_redirect_rule(struct redirect_rule *rule, struct stream *s, struc htx = htx_from_buf(&res->buf); /* Trim any possible response */ channel_htx_truncate(&s->res, htx); - flags = (HTX_SL_F_IS_RESP|HTX_SL_F_VER_11|HTX_SL_F_XFER_LEN|HTX_SL_F_BODYLESS); + flags = (HTX_SL_F_IS_RESP|HTX_SL_F_VER_11|HTX_SL_F_XFER_LEN|HTX_SL_F_CLEN|HTX_SL_F_BODYLESS); sl = htx_add_stline(htx, HTX_BLK_RES_SL, flags, ist("HTTP/1.1"), status, reason); if (!sl) goto fail; @@ -4181,7 +4181,7 @@ void http_perform_server_redirect(struct stream *s, struct stconn *sc) * Create the 302 response */ htx = htx_from_buf(&res->buf); - flags = (HTX_SL_F_IS_RESP|HTX_SL_F_VER_11|HTX_SL_F_XFER_LEN|HTX_SL_F_BODYLESS); + flags = (HTX_SL_F_IS_RESP|HTX_SL_F_VER_11|HTX_SL_F_XFER_LEN|HTX_SL_F_CLEN|HTX_SL_F_BODYLESS); sl = htx_add_stline(htx, HTX_BLK_RES_SL, flags, ist("HTTP/1.1"), ist("302"), ist("Found")); if (!sl) diff --git a/src/stats.c b/src/stats.c index acd3e7e16..f146d2a60 100644 --- a/src/stats.c +++ b/src/stats.c @@ -4439,7 +4439,7 @@ static int stats_send_http_redirect(struct stconn *sc, struct htx *htx) (ctx->flags & STAT_NO_REFRESH) ? ";norefresh" : "", scope_txt); - flags = (HTX_SL_F_IS_RESP|HTX_SL_F_VER_11|HTX_SL_F_XFER_LEN|HTX_SL_F_CHNK); + flags = (HTX_SL_F_IS_RESP|HTX_SL_F_VER_11|HTX_SL_F_XFER_LEN|HTX_SL_F_CLEN|HTX_SL_F_CHNK); sl = htx_add_stline(htx, HTX_BLK_RES_SL, flags, ist("HTTP/1.1"), ist("303"), ist("See Other")); if (!sl) goto full;