diff options
author | Max Kellermann <max@musicpd.org> | 2018-08-02 10:38:20 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-08-02 11:01:45 +0200 |
commit | 906972973e5ff849cfea2e786b6d304057dfc529 (patch) | |
tree | eed11ea82535da7f63404125a012e13e4bdda294 /src/util/UriUtil.cxx | |
parent | 116edf5fcea825455fcf212afebea547d28ad9f5 (diff) |
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
Diffstat (limited to 'src/util/UriUtil.cxx')
-rw-r--r-- | src/util/UriUtil.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/UriUtil.cxx b/src/util/UriUtil.cxx index 61b90da29..bf663cfcd 100644 --- a/src/util/UriUtil.cxx +++ b/src/util/UriUtil.cxx @@ -18,7 +18,7 @@ */ #include "UriUtil.hxx" -#include "StringCompare.hxx" +#include "ASCII.hxx" #include "CharUtil.hxx" #include <assert.h> @@ -169,7 +169,7 @@ SkipUriScheme(const char *uri) noexcept { const char *const schemes[] = { "http://", "https://", "ftp://" }; for (auto scheme : schemes) { - auto result = StringAfterPrefix(uri, scheme); + auto result = StringAfterPrefixCaseASCII(uri, scheme); if (result != nullptr) return result; } |