aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorOddegamra <oddegamra@gmx.org>2013-10-26 16:32:00 +0200
committerMax Kellermann <max@duempel.org>2013-10-26 16:32:00 +0200
commit5f13c1cd9c837a9dacd13e0f79032eb828296673 (patch)
treea64ed05a9cfaed65193132f66d8f99743de794de /src/output
parenta577944ab5a1f4d688e5901fa3efaf7cd1673588 (diff)
downloadmpd-5f13c1cd9c837a9dacd13e0f79032eb828296673.tar.gz
mpd-5f13c1cd9c837a9dacd13e0f79032eb828296673.tar.xz
mpd-5f13c1cd9c837a9dacd13e0f79032eb828296673.zip
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.
Diffstat (limited to 'src/output')
-rw-r--r--src/output/HttpdClient.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/output/HttpdClient.cxx b/src/output/HttpdClient.cxx
index 206062d2c..7d07bd2c6 100644
--- a/src/output/HttpdClient.cxx
+++ b/src/output/HttpdClient.cxx
@@ -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;