From a8df5e109b1adb2b12b239f4794a3e7c79a51c19 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 11 Jan 2018 14:52:35 +0100 Subject: [PATCH] input/curl: use StringView::StartsWith() --- src/lib/curl/Request.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/curl/Request.cxx b/src/lib/curl/Request.cxx index c3965434d..919fc3456 100644 --- a/src/lib/curl/Request.cxx +++ b/src/lib/curl/Request.cxx @@ -173,10 +173,10 @@ gcc_pure static bool IsResponseBoundaryHeader(StringView s) noexcept { - return s.size > 5 && (memcmp(s.data, "HTTP/", 5) == 0 || + return s.size > 5 && (s.StartsWith("HTTP/") || /* the proprietary "ICY 200 OK" is emitted by Shoutcast */ - memcmp(s.data, "ICY 2", 5) == 0); + s.StartsWith("ICY 2")); } inline void