storage/curl: use MapUTF8() to reuse existing escaping code
Commit 29f78b18b1
continued.
Closes https://github.com/MusicPlayerDaemon/MPD/issues/662
This commit is contained in:
parent
ead208987d
commit
56cc42b752
1
NEWS
1
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
|
||||
|
|
|
@ -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() != '/')
|
||||
|
|
Loading…
Reference in New Issue