From 906972973e5ff849cfea2e786b6d304057dfc529 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 2 Aug 2018 10:38:20 +0200 Subject: 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 --- src/lib/nfs/FileReader.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') 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 @@ -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; -- cgit v1.2.3