1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-06-16 06:15:24 +00:00

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:'.
This commit is contained in:
Philipp Schafft 2018-10-31 09:07:19 +00:00
parent 3da438a8da
commit 647c29e061

View File

@ -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,