diff options
Diffstat (limited to 'src/storage/plugins/CurlStorage.cxx')
-rw-r--r-- | src/storage/plugins/CurlStorage.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx index c077b8bb2..8e99f5c56 100644 --- a/src/storage/plugins/CurlStorage.cxx +++ b/src/storage/plugins/CurlStorage.cxx @@ -33,6 +33,7 @@ #include "event/DeferredMonitor.hxx" #include "thread/Mutex.hxx" #include "thread/Cond.hxx" +#include "util/ASCII.hxx" #include "util/RuntimeError.hxx" #include "util/StringCompare.hxx" #include "util/StringFormat.hxx" @@ -590,8 +591,8 @@ CurlStorage::OpenDirectory(const char *uri_utf8) static Storage * CreateCurlStorageURI(EventLoop &event_loop, const char *uri) { - if (strncmp(uri, "http://", 7) != 0 && - strncmp(uri, "https://", 8) != 0) + if (!StringStartsWithCaseASCII(uri, "http://") && + !StringStartsWithCaseASCII(uri, "https://")) return nullptr; return new CurlStorage(event_loop, uri); |