BUG/MINOR: stats: Don't state the 303 redirect response is chunked
Start-line flags for 303-See-Other response returned by the stats applet are not properly set. Indeed, the reponse has a "content-length" header but both HTX_SL_F_CHNK and HTX_SL_F_CLEN flags are set. Because of this bug, the reponse is considered as chunked. So, let's remove HTX_SL_F_CHNK flag. And also add HTX_SL_F_BODYLESS flag because there is no payload ("content-length" header is always set to 0). This patch must be backported to all stable versions. On the 2.8 and lower versions, the commit d0b04920d1 ("BUG/MINOR: htpp-ana/stats: Specify that HTX redirect messages have a C-L header") must be backported first.
This commit is contained in:
parent
e362b076b1
commit
45a45c917a
@ -1571,7 +1571,7 @@ static int stats_send_http_redirect(struct stconn *sc, struct htx *htx)
|
|||||||
(ctx->flags & STAT_F_NO_REFRESH) ? ";norefresh" : "",
|
(ctx->flags & STAT_F_NO_REFRESH) ? ";norefresh" : "",
|
||||||
scope_txt);
|
scope_txt);
|
||||||
|
|
||||||
flags = (HTX_SL_F_IS_RESP|HTX_SL_F_VER_11|HTX_SL_F_XFER_LEN|HTX_SL_F_CLEN|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_BODYLESS);
|
||||||
sl = htx_add_stline(htx, HTX_BLK_RES_SL, flags, ist("HTTP/1.1"), ist("303"), ist("See Other"));
|
sl = htx_add_stline(htx, HTX_BLK_RES_SL, flags, ist("HTTP/1.1"), ist("303"), ist("See Other"));
|
||||||
if (!sl)
|
if (!sl)
|
||||||
goto full;
|
goto full;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user