case-insensitive URI scheme comparison
Required according to RFC 3986: > An implementation should accept uppercase letters as equivalent to > lowercase in scheme names Closes #330
This commit is contained in:
@@ -458,8 +458,8 @@ CurlInputStream::Open(const char *url, Mutex &mutex, Cond &cond)
|
||||
static InputStream *
|
||||
input_curl_open(const char *url, Mutex &mutex, Cond &cond)
|
||||
{
|
||||
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, cond);
|
||||
|
||||
Reference in New Issue
Block a user