From 647c29e0612e6505f946a87e7075902d19de8670 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Wed, 31 Oct 2018 09:07:19 +0000 Subject: [PATCH] Update: Changed set of default headers. Two changes have been made. Both are HTTP/1.1 related changes and are purly meant for HTTP/1.1 clients that do not correctly support HTTP/1.0. * Added 'Connection: Close'. * Added 'no-store' to 'Cache-Control:'. --- src/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.c b/src/util.c index f8aeff8e..d024c864 100644 --- a/src/util.c +++ b/src/util.c @@ -638,13 +638,13 @@ ssize_t util_http_build_header(char * out, size_t len, ssize_t offset, config = config_get_config(); extra_headers = _build_headers(status, config, source); - ret = snprintf (out, len, "%sServer: %s\r\n%s%s%s%s%s%s%s", + ret = snprintf (out, len, "%sServer: %s\r\nConnection: Close\r\n%s%s%s%s%s%s%s", status_buffer, config->server_id, currenttime_buffer, contenttype_buffer, (status == 401 ? "WWW-Authenticate: Basic realm=\"Icecast2 Server\"\r\n" : ""), - (cache ? "" : "Cache-Control: no-cache\r\n" + (cache ? "" : "Cache-Control: no-cache, no-store\r\n" "Expires: Mon, 26 Jul 1997 05:00:00 GMT\r\n" "Pragma: no-cache\r\n"), extra_headers,