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:
@@ -20,7 +20,7 @@
|
||||
#include "config.h"
|
||||
#include "InputStream.hxx"
|
||||
#include "thread/Cond.hxx"
|
||||
#include "util/StringCompare.hxx"
|
||||
#include "util/ASCII.hxx"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
@@ -77,8 +77,8 @@ gcc_pure
|
||||
static bool
|
||||
ExpensiveSeeking(const char *uri) noexcept
|
||||
{
|
||||
return StringStartsWith(uri, "http://") ||
|
||||
StringStartsWith(uri, "https://");
|
||||
return StringStartsWithCaseASCII(uri, "http://") ||
|
||||
StringStartsWithCaseASCII(uri, "https://");
|
||||
}
|
||||
|
||||
bool
|
||||
|
Reference in New Issue
Block a user