]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stats: send content-length with the redirect to allow keep-alive
authorWilly Tarreau <w@1wt.eu>
Tue, 26 Jan 2016 12:57:29 +0000 (13:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 27 Jan 2016 19:22:36 +0000 (20:22 +0100)
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.

src/dumpstats.c

index cc380382209de66fe02cbea2663659490acde67a..f43a5cc83fa6295f23bfda4125738a1e9e8cd960 100644 (file)
@@ -5176,6 +5176,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) &&