From e98d4670b84a604c7ab967e7fcd0a1e35bbc8229 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 15 Oct 2019 16:22:02 +0200 Subject: [PATCH] storage/curl: work around different case in hex digits --- src/storage/plugins/CurlStorage.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx index 3790cc5a8..13150d920 100644 --- a/src/storage/plugins/CurlStorage.cxx +++ b/src/storage/plugins/CurlStorage.cxx @@ -492,7 +492,11 @@ private: if (path == nullptr) return nullptr; - path = StringAfterPrefix(path, base_path.c_str()); + /* kludge: ignoring case in this comparison to avoid + false negatives if the web server uses a different + case in hex digits in escaped characters; TODO: + implement properly */ + path = StringAfterPrefixIgnoreCase(path, base_path.c_str()); if (path == nullptr || *path == 0) return nullptr;