storage/curl: request the "resourcetype" property to fix update

Without requesting the property, "good" WebDAV servers would not send
it, and so MPD could never recognize a directory, failing the database
update.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/660
This commit is contained in:
Max Kellermann 2019-10-07 12:44:48 +02:00
parent 23d08820a2
commit dcc5ce6792
2 changed files with 3 additions and 0 deletions

2
NEWS
View File

@ -1,4 +1,6 @@
ver 0.21.16 (not yet released)
* storage
- curl: request the "resourcetype" property to fix database update
* update
- fix crash when music_directory is not a directory

View File

@ -277,6 +277,7 @@ public:
request.SetOption(CURLOPT_POSTFIELDS,
"<?xml version=\"1.0\"?>\n"
"<a:propfind xmlns:a=\"DAV:\">"
"<a:prop><a:resourcetype/></a:prop>"
"<a:prop><a:getcontenttype/></a:prop>"
"<a:prop><a:getcontentlength/></a:prop>"
"</a:propfind>");