From 893e5405762944627176f50ee101a33a35d2fbeb Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 26 Jan 2016 13:57:29 +0100 Subject: MINOR: stats: send content-length with the redirect to allow keep-alive After a POST on the stats admin page, a 303 is emitted. Unfortunately this 303 doesn't contain a content-length, which forces the connection to be closed and reopened. Let's simply add a content-length: 0 to solve this. (cherry picked from commit fdfcc9d2b75e97f81b40f80ddd341ab77550f43b) --- src/dumpstats.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dumpstats.c b/src/dumpstats.c index e99a7e8..3cd54f1 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -5138,6 +5138,7 @@ static int stats_send_http_redirect(struct stream_interface *si) "Content-Type: text/plain\r\n" "Connection: close\r\n" "Location: %s;st=%s%s%s%s\r\n" + "Content-length: 0\r\n" "\r\n", uri->uri_prefix, ((appctx->ctx.stats.st_code > STAT_STATUS_INIT) && -- 1.7.12.1