]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stats: always emit HTTP/1.1 in responses
authorWilly Tarreau <w@1wt.eu>
Thu, 24 Apr 2014 20:51:54 +0000 (22:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 24 Apr 2014 20:53:43 +0000 (22:53 +0200)
We used to emit either 1.0 or 1.1 depending on whether we were sending
chunks or not. This condition is useless, better always send 1.1. Also
that way at least clients and intermediary proxies know we speak 1.1.
The "Connection: close" header is still set anyway.

src/dumpstats.c

index dd017e191b08d26e9a7b6f75620d819d8cee5bee..5f28e1c99dcde6ca09293f42c53a64a527396ec0 100644 (file)
@@ -4357,11 +4357,10 @@ static int stats_send_http_headers(struct stream_interface *si)
        struct appctx *appctx = objt_appctx(si->end);
 
        chunk_printf(&trash,
-                    "HTTP/1.%c 200 OK\r\n"
+                    "HTTP/1.1 200 OK\r\n"
                     "Cache-Control: no-cache\r\n"
                     "Connection: close\r\n"
                     "Content-Type: %s\r\n",
-                    (appctx->ctx.stats.flags & STAT_CHUNKED) ? '1' : '0',
                     (appctx->ctx.stats.flags & STAT_FMT_HTML) ? "text/html" : "text/plain");
 
        if (uri->refresh > 0 && !(appctx->ctx.stats.flags & STAT_NO_REFRESH))