GNOME Bugzilla – Bug 654679
support for arbitrary WebDAV properties
Last modified: 2018-09-21 17:09:41 UTC
WebDAV supports arbitrary properties (namespace + name -> value). This is a perfect way to store metadata from the Sugar data store alongside the documents on a remote WebDAV server for sharing among Sugar users and between Sugar and non-Sugar (e.g. Gnome) users. We already use gio (and thus gvfs) in the Journal for browsing file systems. This would be easy enough to extend to WebDAV. However one crucial feature is missing: a way to access (i.e. read and write) arbitrary WebDAV properties. gvfsbackenddav.c currently contains a hardcoded list of properties it supports (ls_propnames). The gio GFileInfo data structure is flexible enough to support this, e.g. by using a "webdav::<namespace>::<name>" naming convention with URL encoding (RFC 2396 2.4.1 Escaped Encoding) for colons. I.e. the property with namespace http://people.sugarlabs.org/~silbe/webdavns/sugar and name activity_id would be identified by the string 'webdav::http%3a//people.sugarlabs.org/~silbe/webdavns/sugar::activity_id' when using gio.
Created attachment 203949 [details] [review] webdav: Check namespace of standard WebDAV attributes in <multistatus>
Created attachment 203950 [details] [review] webdav: return arbitrary WebDAV properties Return all unknown WebDAV properties sent by the server to the caller in the format "webdav::<namespace>::<name>", where special characters in <namespace> are URI encoded.
Created attachment 203951 [details] [review] webdav: add support for querying (all) arbitrary WebDAV If the caller requests the entire 'webdav' namespace by querying for 'webdav::*', we will generate an allprop request. Querying just individual properties is not supported.
Created attachment 203952 [details] [review] WIP: WebDAV property setting support Doesn't work yet, though it's unclear whether this is actually triggered by the changes or broken for different reasons. Querying the settable attributes or writable namespaces gives random, binary strings as names (though the number of results might be ok).
I'm probably not going to work on this for several weeks, so I've attached the current work-in-progress patches. They're not ready for inclusion yet, but I'd nevertheless appreciate some feedback regarding both on the approach (as far as it can be determined from ticket description and the admittedly rather sparse patch descriptions) and the implementation. I wouldn't mind anyone picking this up and finishing it, either. Just make sure to leave a comment here so we don't duplicate the effort.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gvfs/issues/167.