Merge branch 'v0.20.x'

This commit is contained in:
Max Kellermann
2018-08-02 11:07:40 +02:00
19 changed files with 66 additions and 47 deletions

View File

@@ -466,8 +466,8 @@ OpenCurlInputStream(const char *uri,
static InputStreamPtr
input_curl_open(const char *url, Mutex &mutex)
{
if (strncmp(url, "http://", 7) != 0 &&
strncmp(url, "https://", 8) != 0)
if (!StringStartsWithCaseASCII(url, "http://") &&
!StringStartsWithCaseASCII(url, "https://"))
return nullptr;
return CurlInputStream::Open(url, {}, mutex);