summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/server.php
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-11-19 10:55:07 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-11-19 10:55:07 +0100
commit3869db12902df17fdff3275a228486167d792090 (patch)
treea3f349da65b0bff352e4489b69eb161549ef9e1a /apps/dav/lib/server.php
parent4ff34daedb17a93aa8afc7ee1004b7c71386f794 (diff)
parent5fc414abfdb959494f1be51bfbd3f148c4aa9205 (diff)
downloadnextcloud-server-3869db12902df17fdff3275a228486167d792090.tar.gz
nextcloud-server-3869db12902df17fdff3275a228486167d792090.zip
Merge pull request #20537 from owncloud/add-internal-locking-to-new-webdav-endpoint
Add internal locking plugin
Diffstat (limited to 'apps/dav/lib/server.php')
-rw-r--r--apps/dav/lib/server.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/dav/lib/server.php b/apps/dav/lib/server.php
index ae0fe5123f4..229f33858d9 100644
--- a/apps/dav/lib/server.php
+++ b/apps/dav/lib/server.php
@@ -17,6 +17,9 @@ class Server {
public function __construct(IRequest $request, $baseUri) {
$this->request = $request;
$this->baseUri = $baseUri;
+ $logger = \OC::$server->getLogger();
+ $dispatcher = \OC::$server->getEventDispatcher();
+
$root = new RootCollection();
$this->server = new \OCA\DAV\Connector\Sabre\Server($root);
@@ -32,6 +35,10 @@ class Server {
$this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig()));
$this->server->addPlugin(new Plugin($authBackend, 'ownCloud'));
+ $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\DummyGetResponsePlugin());
+ $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin('webdav', $logger));
+ $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin());
+ $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ListenerPlugin($dispatcher));
// calendar plugins
$this->server->addPlugin(new \Sabre\CalDAV\Plugin());