Commit 56cc42b7 authored by Max Kellermann's avatar Max Kellermann

storage/curl: use MapUTF8() to reuse existing escaping code

parent ead20898
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
......
......@@ -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() != '/')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment