Commit 5f13c1cd authored by Oddegamra's avatar Oddegamra Committed by Max Kellermann

output/httpd: accept icy-metadata with and without space

Some, or most, Win32 audio players will pass "icy-metadata:1" to streaming servers. MPD expects a space between ":" and "1" at this point, and thus does not send any stream metadata. This applies to foobar2k and Winamp, for example. According to forums.radiotoolbox.com/viewtopic.php?t=74 not having a space there is expected behavior, so maybe MPD could accept both forms to determine if metadata should be sent or not.
parent a577944a
......@@ -113,7 +113,8 @@ HttpdClient::HandleLine(const char *line)
return true;
}
if (StringEqualsCaseASCII(line, "Icy-MetaData: 1", 15)) {
if (StringEqualsCaseASCII(line, "Icy-MetaData: 1", 15) ||
StringEqualsCaseASCII(line, "Icy-MetaData:1", 14)) {
/* Send icy metadata */
metadata_requested = metadata_supported;
return true;
......
Markdown is supported
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