input/curl: use StringView::StartsWith()

This commit is contained in:
Max Kellermann 2018-01-11 14:52:35 +01:00
parent ba4f1da466
commit a8df5e109b
1 changed files with 2 additions and 2 deletions

View File

@ -173,10 +173,10 @@ gcc_pure
static bool static bool
IsResponseBoundaryHeader(StringView s) noexcept 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 /* the proprietary "ICY 200 OK" is
emitted by Shoutcast */ emitted by Shoutcast */
memcmp(s.data, "ICY 2", 5) == 0); s.StartsWith("ICY 2"));
} }
inline void inline void