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/lib | |
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/lib')
-rw-r--r-- | src/lib/nfs/FileReader.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/nfs/FileReader.cxx b/src/lib/nfs/FileReader.cxx index 4bf7a43da..1d030a28f 100644 --- a/src/lib/nfs/FileReader.cxx +++ b/src/lib/nfs/FileReader.cxx @@ -24,7 +24,7 @@ #include "Connection.hxx" #include "event/Call.hxx" #include "IOThread.hxx" -#include "util/StringCompare.hxx" +#include "util/ASCII.hxx" #include <utility> @@ -93,7 +93,7 @@ NfsFileReader::Open(const char *uri) { assert(state == State::INITIAL); - if (!StringStartsWith(uri, "nfs://")) + if (!StringStartsWithCaseASCII(uri, "nfs://")) throw std::runtime_error("Malformed nfs:// URI"); uri += 6; |