You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WebDav: Using "allprop" on PROPFIND does not behave as expected #11803
When using WebDav, the PROPFIND method is used to get a list of WebDav properties (i.e. files and folders saved in ownCloud). When using the so called "allprop" on PROPFIND, ownCloud seems not to include all properties (defined in RFC4918 "HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)") in the response.
As an example: Let's assume that the "displayname" was changed on a file with a previous PROPPATCH command. Using an allprop-PROPFIND, ownCloud only returns the following properties: oc:id, oc:permissions, d:getetag, d:getlastmodified, d:resourcetype, d:quota-used-bytes, d:quota-available-bytes. According to RFC4918, an allprop-PROPFIND must return all live properties defined in the specification plus dead properties.
As a side note: d:quota-used-bytes, d:quota-available-bytes are not defined in RFC4918 and should not be part of the namespace xmlns:d="DAV:".
On the other hand: Trying to request a specific named property (in this case "displayname") with PROPFIND, the request content will look like this:
{DAV:}allprop is kind of a bad idea. We recommend not using it at all. The only client that uses this are microsoft's clients, so we're retuning a list of properties that mostly makes sense for them. Extending the list of default properties that are returned {DAV:}allprop from there would mostly just serve to negatively affect performance for the few clients that use it.
quota-used-bytes and quota-available-bytes are defined in RFC4331 and certainly are in the DAV: namespace, just like many other webdav extensions.
Well at least having clients saying what they want can remove some load on the server, as requiring some props like "oc:tags" would cause an additional performance impact. So if not requested, it would save that.
Still, I see that the code in ownCloud is still retrieving all properties from oc_properties then throwing them away again. We can probably save some PROPFIND performance here by not doing that SELECT in the first place.
The hacks that included some "oc:*" properties in "allprops" are now removed.
All OC clients that require such attributes must request them explicitly.
Activity
DeepDiver1975 commentedon Oct 28, 2014
all webdav operations are handled by sabredav - summoning @evert - THX
evert commentedon Oct 28, 2014
{DAV:}allpropis kind of a bad idea. We recommend not using it at all. The only client that uses this are microsoft's clients, so we're retuning a list of properties that mostly makes sense for them. Extending the list of default properties that are returned{DAV:}allpropfrom there would mostly just serve to negatively affect performance for the few clients that use it.quota-used-bytesandquota-available-bytesare defined in RFC4331 and certainly are in theDAV:namespace, just like many other webdav extensions.PVince81 commentedon Dec 15, 2014
From what I see in the code it seems that if no properties are given, it will default to a small set of properties: https://github.com/owncloud/core/blob/master/lib/private/connector/sabre/server.php#L175 which also seems to be in the original Sabre code: https://github.com/fruux/sabre-dav/blob/1.8/lib/Sabre/DAV/Server.php#L1497
I found during my test here with a custom property #12862 that it doesn't return that custom property unless explicitly asked.
So I guess like @evert said it isn't such a good idea.
This means that I cannot add a custom property "oc:tags" for the file tags (#12856) unless we expect the clients to explicitly request it.
PVince81 commentedon Dec 15, 2014
Well at least having clients saying what they want can remove some load on the server, as requiring some props like "oc:tags" would cause an additional performance impact. So if not requested, it would save that.
Still, I see that the code in ownCloud is still retrieving all properties from
oc_propertiesthen throwing them away again. We can probably save some PROPFIND performance here by not doing that SELECT in the first place.evert commentedon Dec 15, 2014
I'd leave any refactoring until you upgrade to 2.x ;) property handling has changed significantly, so you'd be doing it twice.
DeepDiver1975 commentedon Dec 16, 2014
@PVince81 should we consider sabre 2.x upgrade for oc8? Just to get the base work done properly?
Most critical will be testing of the sync algo. But this is meanwhile part of our client test matrix on jenkins.
PVince81 commentedon Dec 16, 2014
I think we'll run out of time for OC 8.0, but could work for OC 8.1.
We could already start a branch to get an idea about how much work it would be.
PVince81 commentedon Feb 12, 2015
Upgrade to sabre 2.0 ticket here: #12876 PR here #14151
PVince81 commentedon Mar 9, 2015
Upgrade to Sabre 2.0 has been merged to master.
The hacks that included some "oc:*" properties in "allprops" are now removed.
All OC clients that require such attributes must request them explicitly.
Closing.
(also see #11803 (comment))