summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--src/storage/plugins/CurlStorage.cxx9
2 files changed, 3 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index 276fe027d..c0d175464 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
ver 0.21.16 (not yet released)
* storage
- curl: request the "resourcetype" property to fix database update
+ - curl: URL-encode more paths
* update
- fix crash when music_directory is not a directory
* fix build with iconv() instead of ICU
diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx
index 8f2dea64f..3790cc5a8 100644
--- a/src/storage/plugins/CurlStorage.cxx
+++ b/src/storage/plugins/CurlStorage.cxx
@@ -445,9 +445,7 @@ CurlStorage::GetInfo(const char *uri_utf8, gcc_unused bool follow)
{
// TODO: escape the given URI
- std::string uri = base;
- uri += uri_utf8;
-
+ const auto uri = MapUTF8(uri_utf8);
return HttpGetInfoOperation(*curl, uri.c_str()).Perform();
}
@@ -537,10 +535,7 @@ protected:
std::unique_ptr<StorageDirectoryReader>
CurlStorage::OpenDirectory(const char *uri_utf8)
{
- // TODO: escape the given URI
-
- std::string uri = base;
- uri += uri_utf8;
+ std::string uri = MapUTF8(uri_utf8);
/* collection URIs must end with a slash */
if (uri.back() != '/')