Commit 8e0777a4 authored by Philipp Schafft's avatar Philipp Schafft 🦁
Browse files

allow <stream-name> to override the icy-name: HTTP header, close #1359

svn path=/icecast/trunk/icecast/; revision=18543
parent 7eb5e1b6
......@@ -333,7 +333,22 @@ static int format_prepare_headers (source_t *source, client_t *client)
if (strcasecmp(var->name, "ice-password") &&
strcasecmp(var->name, "icy-metaint"))
if (!strncasecmp("ice-", var->name, 4))
if (!strcasecmp(var->name, "ice-name"))
ice_config_t *config;
mount_proxy *mountinfo;
config = config_get_config();
mountinfo = config_find_mount (config, source->mount);
if (mountinfo && mountinfo->stream_name)
bytes = snprintf (ptr, remaining, "icy-name:%s\r\n", mountinfo->stream_name);
bytes = snprintf (ptr, remaining, "icy-name:%s\r\n", var->value);
else if (!strncasecmp("ice-", var->name, 4))
if (!strcasecmp("ice-public", var->name))
bytes = snprintf (ptr, remaining, "icy-pub:%s\r\n", var->value);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment