sigoden / dufs

A file server that supports static serving, uploading, searching, accessing control, webdav...
Other
5.45k stars 259 forks source link

PROPFIND request body with properies gets ignored #400

Closed grote closed 1 month ago

grote commented 1 month ago

The following curl request is only asking for displayname and resourcetype properties:

curl --user "user:pass" -X PROPFIND 'https://example.com/dufs' -H "Depth: 1" -H 'Content-Type: application/xml' -d @- << EOF
<?xml version='1.0' encoding='UTF-8' ?><propfind xmlns="DAV:"><prop><displayname /><resourcetype /></prop></propfind>
EOF

yet still other properties get returned:

<D:getlastmodified>Thu, 13 Jun 2024 18:21:58 GMT</D:getlastmodified>

Other WebDAV implementations only seem to return what I asked for.

Background: This may not be an issue apart from response sizes, but I actually get a runtime crash in a project, because a library is used for parsing getlastmodified which I don't want to depend on, but my WebDAV client library pulls this in at runtime when it finds the getlastmodified property.

sigoden commented 1 month ago

Sorrry, Your current requirements exceed the webdav capabilities of dufs.

Dufs do not guarantee strict compliance with the WebDAV specification.

For example, it doesn't implement PROPPATCH, LOCK, or UNLOCK. Additionally, Dufs can only handle PROPFIND with a depth of 0 or 1.

We just need WebDAV on dufs to handle basic operations.