-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webDAV PROPFIND #5947
Comments
I guess we will not support this, because it means to basically dump all of the users file tree, which can be really big. @marinofaggiana Why do you need this? What is the use case for this? |
If you want to detect changes, have a look at the etag. It is described in here for example: https://dragotin.wordpress.com/2015/03/13/owncloud-etags-and-fileids/ |
oh no ! I use already the etag for detect the changes but for the first sync or download of all files the "infinity" is more efficient of several recursive request in all branches |
mmm can I try with search "infinity" .... but I don't know if this is efficient |
Cc @icewind1991 for the server @tobiasKaminsky @AndyScherzinger how is this done in android? |
Initial we do it recursive and later we only check the entered folder. |
Just do it recursive. Infinity is not a good idea. Even the desktop client (where the clients have significant more processing power) doesn't do this. |
The problem here is that since owncloud 9.1 the server behaves wrong. With depth: infinity (Which is an almost all the cases at least 10 times faster then the 1000 requests variant) the properties of the children are wrong (ETags....). |
the recursive for request on network is a bad, several useless traffic and several useless cycles of CPU |
@marinofaggiana well your choice. But I guess a lot of users also won't be happy if you start parsing a >50mb xml file. |
Also, can you give me concrete reproduction steps of what is broken? Here the on files I don't see the collection set. |
@julian-r same goes for you. Do you have concrete steps that show the issue? Etag is nicely updated here... |
@rullzer e.g.
For my app it's the same ... the app is blocked but the traffic it's less and I don't have several task on memory ... and I don't have a cycle of CPU for managed 10 ... 15 request on network for read the subfolder |
<?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
<d:response>
<d:href>/remote.php/webdav/</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 10:53:19 GMT</d:getlastmodified>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>6823068</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"598ae99fa1b4e"</d:getetag>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Documents/</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 10:53:19 GMT</d:getlastmodified>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>78496</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"598ae99fa1b4e"</d:getetag>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Documents/About.odt</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 10:53:19 GMT</d:getlastmodified>
<d:getcontentlength>77422</d:getcontentlength>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>78496</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"598ae99fa1b4e"</d:getetag>
<d:getcontenttype>application/vnd.oasis.opendocument.text</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Documents/About.txt</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 10:53:19 GMT</d:getlastmodified>
<d:getcontentlength>1074</d:getcontentlength>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>78496</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"598ae99fa1b4e"</d:getetag>
<d:getcontenttype>text/plain</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Nextcloud%20Manual.pdf</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 10:53:19 GMT</d:getlastmodified>
<d:getcontentlength>3922148</d:getcontentlength>
<d:resourcetype/>
<d:getetag>"c9e79010231abd65224aa021f0f6ca93"</d:getetag>
<d:getcontenttype>application/pdf</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Nextcloud.mp4</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 10:53:19 GMT</d:getlastmodified>
<d:getcontentlength>462413</d:getcontentlength>
<d:resourcetype/>
<d:getetag>"906b84092187548715f21becbfffe8f1"</d:getetag>
<d:getcontenttype>video/mp4</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Photos/</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 10:53:19 GMT</d:getlastmodified>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>2360011</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"598ae99f497b5"</d:getetag>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Photos/Coast.jpg</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 10:53:19 GMT</d:getlastmodified>
<d:getcontentlength>819766</d:getcontentlength>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>2360011</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"598ae99f497b5"</d:getetag>
<d:getcontenttype>image/jpeg</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Photos/Hummingbird.jpg</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 10:53:19 GMT</d:getlastmodified>
<d:getcontentlength>585219</d:getcontentlength>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>2360011</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"598ae99f497b5"</d:getetag>
<d:getcontenttype>image/jpeg</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Photos/Nut.jpg</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 10:53:19 GMT</d:getlastmodified>
<d:getcontentlength>955026</d:getcontentlength>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>2360011</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"598ae99f497b5"</d:getetag>
<d:getcontenttype>image/jpeg</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
</d:multistatus>
Also a request to the root without the infinity header works, but not recursively in the rfc it states it SHOULD be handled like with recursion. (Yeah not MUST) rfc4918 9.9. :
|
The infinity header. Yeah 'should'. But this is disabled by default in sabre (the dav library we use). Since it can very easily bring down servers. I can't reproduce the resourcetype on files. Did you also check on nc 12? |
@rullzer read my first post, this is a bug |
Also the same for files?
<d:response>
<d:href>/remote.php/webdav/Photos/Nut.jpg</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 10:53:19 GMT</d:getlastmodified>
<d:getcontentlength>955026</d:getcontentlength>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>2360011</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"598ae99f497b5"</d:getetag>
<d:getcontenttype>image/jpeg</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Photos/Nut.jpg</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 10:53:19 GMT</d:getlastmodified>
<d:getcontentlength>955026</d:getcontentlength>
<d:resourcetype/>
<d:getetag>"8f5dc29a51ade95b9e3fc3f7f06d9e48"</d:getetag>
<d:getcontenttype>image/jpeg</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response> If you compare them and check
|
Please get me your docker compose file as this is working as intended on my test setup |
ok your webdav response indeed looks wrong... but I just launched your docker compose... <?xml version="1.0"?>
<d:multistatus xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">
<d:response>
<d:href>/remote.php/webdav/</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 20:21:24 GMT</d:getlastmodified>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>6958791</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"598b6ec42d49c"</d:getetag>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Documents/</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 20:21:24 GMT</d:getlastmodified>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>78496</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"598b6ec410270"</d:getetag>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<d:getcontentlength/>
<d:getcontenttype/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Documents/About.odt</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 20:21:24 GMT</d:getlastmodified>
<d:getcontentlength>77422</d:getcontentlength>
<d:resourcetype/>
<d:getetag>"c28d32a95c7296ee5d256f6b50c595fe"</d:getetag>
<d:getcontenttype>application/vnd.oasis.opendocument.text</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<d:quota-used-bytes/>
<d:quota-available-bytes/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Documents/About.txt</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 20:21:24 GMT</d:getlastmodified>
<d:getcontentlength>1074</d:getcontentlength>
<d:resourcetype/>
<d:getetag>"42c314731b3d3c93c0b8a8306633444f"</d:getetag>
<d:getcontenttype>text/plain</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<d:quota-used-bytes/>
<d:quota-available-bytes/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Nextcloud%20Manual.pdf</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 20:21:24 GMT</d:getlastmodified>
<d:getcontentlength>4057871</d:getcontentlength>
<d:resourcetype/>
<d:getetag>"fca2181dceca2a1e15113dc3c9e13652"</d:getetag>
<d:getcontenttype>application/pdf</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<d:quota-used-bytes/>
<d:quota-available-bytes/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Nextcloud.mp4</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 20:21:24 GMT</d:getlastmodified>
<d:getcontentlength>462413</d:getcontentlength>
<d:resourcetype/>
<d:getetag>"f4100645143f5f574cad57c638ce151e"</d:getetag>
<d:getcontenttype>video/mp4</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<d:quota-used-bytes/>
<d:quota-available-bytes/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Photos/</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 20:21:23 GMT</d:getlastmodified>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
<d:quota-used-bytes>2360011</d:quota-used-bytes>
<d:quota-available-bytes>-3</d:quota-available-bytes>
<d:getetag>"598b6ec3dfcaf"</d:getetag>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<d:getcontentlength/>
<d:getcontenttype/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Photos/Coast.jpg</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 20:21:23 GMT</d:getlastmodified>
<d:getcontentlength>819766</d:getcontentlength>
<d:resourcetype/>
<d:getetag>"a147c0ecebf65ec566bd09ab0f230cfc"</d:getetag>
<d:getcontenttype>image/jpeg</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<d:quota-used-bytes/>
<d:quota-available-bytes/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Photos/Hummingbird.jpg</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 20:21:23 GMT</d:getlastmodified>
<d:getcontentlength>585219</d:getcontentlength>
<d:resourcetype/>
<d:getetag>"6902a39565cedfc24459fc701f850af7"</d:getetag>
<d:getcontenttype>image/jpeg</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<d:quota-used-bytes/>
<d:quota-available-bytes/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/remote.php/webdav/Photos/Nut.jpg</d:href>
<d:propstat>
<d:prop>
<d:getlastmodified>Wed, 09 Aug 2017 20:21:23 GMT</d:getlastmodified>
<d:getcontentlength>955026</d:getcontentlength>
<d:resourcetype/>
<d:getetag>"55dafbce5e283451c330c9544919f629"</d:getetag>
<d:getcontenttype>image/jpeg</d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<d:quota-used-bytes/>
<d:quota-available-bytes/>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
</d:multistatus> That is mine on the nextcloud:12 image |
WebDAV is horrible ... |
also the 11 images works properly for me... and return valid stuff... |
mmm for me no.... always
|
@rullzer The response you sent, had a payload in the requests, right? I always sent the requests without payload. |
@rullzer Are you the maintainer for webdav in nc? |
@julian-r No payload. Aaaah I did test with 12.0.1 I must admit. |
@julian-r I have been known to work on the dav part yes ;) @marinofaggiana please upgrade your test instance as it should be fixed there. |
Yes, 12.0.1 works @julian-r
and (e.g. 1200 records is very speed) ... as I imagined, recursive is very bad ... now the issue is for pervious version .. :( |
Hello everybody. How can I to get XML response without 'd:' (or any) prefix? |
If I send a request PROPFIND with Depth "infinity" e.g.
the Response has all record as collection:
Possible ?
@MorrisJobke can you try ?
thx
The text was updated successfully, but these errors were encountered: