From ac8dce6599e1d852d51d1245d23745a4da0f9d26 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 10 Mar 2017 16:28:02 +0100 Subject: [PATCH] lib/curl/Request: "ICY 200 OK" is a response boundary header --- NEWS | 2 ++ src/lib/curl/Request.cxx | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 36e4dcaf4..e60407e8d 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.20.6 (not yet released) +* input + - curl: fix headers after HTTP redirect to Shoutcast server * decoder - ffmpeg: re-enable as fallback - mpcdec: fix crash (division by zero) after seeking diff --git a/src/lib/curl/Request.cxx b/src/lib/curl/Request.cxx index b0e3cfca9..14d626b34 100644 --- a/src/lib/curl/Request.cxx +++ b/src/lib/curl/Request.cxx @@ -172,7 +172,10 @@ gcc_pure static bool IsResponseBoundaryHeader(StringView s) { - return s.size > 5 && memcmp(s.data, "HTTP/", 5) == 0; + return s.size > 5 && (memcmp(s.data, "HTTP/", 5) == 0 || + /* the proprietary "ICY 200 OK" is + emitted by Shoutcast */ + memcmp(s.data, "ICY 2", 5) == 0); } inline void