Add fake locking support for OneNote 2013

Fixes https://github.com/owncloud/core/issues/21925
This commit is contained in:
Lukas Reschke 2016-01-26 17:31:01 +01:00
parent aa598fc701
commit b6ca05f9a0
2 changed files with 12 additions and 6 deletions

View File

@ -103,9 +103,12 @@ class ServerFactory {
$server->addPlugin(new \OCA\DAV\Connector\Sabre\DummyGetResponsePlugin()); $server->addPlugin(new \OCA\DAV\Connector\Sabre\DummyGetResponsePlugin());
$server->addPlugin(new \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin('webdav', $this->logger)); $server->addPlugin(new \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin('webdav', $this->logger));
$server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin()); $server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin());
// Finder on OS X requires Class 2 WebDAV support (locking), since we do // Some WebDAV clients do require Class 2 WebDAV support (locking), since
// not provide locking we emulate it using a fake locking plugin. // we do not provide locking we emulate it using a fake locking plugin.
if($this->request->isUserAgent(['/WebDAVFS/'])) { if($this->request->isUserAgent([
'/WebDAVFS/',
'/Microsoft Office OneNote 2013/',
])) {
$server->addPlugin(new \OCA\DAV\Connector\Sabre\FakeLockerPlugin()); $server->addPlugin(new \OCA\DAV\Connector\Sabre\FakeLockerPlugin());
} }

View File

@ -96,9 +96,12 @@ class Server {
\OC::$server->getUserSession() \OC::$server->getUserSession()
)); ));
// Finder on OS X requires Class 2 WebDAV support (locking), since we do // Some WebDAV clients do require Class 2 WebDAV support (locking), since
// not provide locking we emulate it using a fake locking plugin. // we do not provide locking we emulate it using a fake locking plugin.
if($request->isUserAgent(['/WebDAVFS/'])) { if($request->isUserAgent([
'/WebDAVFS/',
'/Microsoft Office OneNote 2013/',
])) {
$this->server->addPlugin(new \OCA\DAV\Connector\Sabre\FakeLockerPlugin()); $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\FakeLockerPlugin());
} }