diff options
author | Lukas Reschke <lukas@owncloud.com> | 2015-11-13 11:47:32 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-11-13 23:31:08 +0100 |
commit | a3fc40921b20a3fcc1c7260f4abfcadc5a8c1d13 (patch) | |
tree | b359e30824d121cf2004ae4a048710d68a6ecbee /apps/dav/lib/server.php | |
parent | 1e9203cdef7009ef129f0f3e3db6a326d3f4db12 (diff) | |
download | nextcloud-server-a3fc40921b20a3fcc1c7260f4abfcadc5a8c1d13.tar.gz nextcloud-server-a3fc40921b20a3fcc1c7260f4abfcadc5a8c1d13.zip |
Add fake locker plugin for WebDAVFS
WebDAVFS as used by Finder requires a Class 2 compatible WebDAV server. This change introduces a fake locking provider which will simply advertise Locking support when a request originates from WebDAVFS. It will also return successful LOCK and UNLOCK responses.
Diffstat (limited to 'apps/dav/lib/server.php')
-rw-r--r-- | apps/dav/lib/server.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/dav/lib/server.php b/apps/dav/lib/server.php index a92c9980f54..395544761ab 100644 --- a/apps/dav/lib/server.php +++ b/apps/dav/lib/server.php @@ -37,6 +37,12 @@ class Server { $this->server->addPlugin(new \Sabre\CardDAV\Plugin()); + // Finder on OS X requires Class 2 WebDAV support (locking), since we do + // not provide locking we emulate it using a fake locking plugin. + if($request->isUserAgent(['/WebDAVFS/'])) { + $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\FakeLockerPlugin()); + } + // wait with registering these until auth is handled and the filesystem is setup $this->server->on('beforeMethod', function () { // custom properties plugin must be the last one |