From 5f13c1cd9c837a9dacd13e0f79032eb828296673 Mon Sep 17 00:00:00 2001 From: Oddegamra Date: Sat, 26 Oct 2013 16:32:00 +0200 Subject: 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. --- src/output/HttpdClient.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3