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.
This commit is contained in:
Oddegamra 2013-10-26 16:32:00 +02:00 committed by Max Kellermann
parent a577944ab5
commit 5f13c1cd9c
1 changed files with 2 additions and 1 deletions

View File

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