summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-10-04 16:09:07 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-10-04 20:20:33 +0200
commit414b2eb4b672ef5d49985de27edca3e5bb54d5d6 (patch)
tree68bad704c170380d89eab3b1a2fcee4b1b5d8672 /lib
parent7337b341106b6ae093b8d56c4d885b497db6e5aa (diff)
downloadnextcloud-server-414b2eb4b672ef5d49985de27edca3e5bb54d5d6.tar.gz
nextcloud-server-414b2eb4b672ef5d49985de27edca3e5bb54d5d6.zip
upload abortion detection only for PUT
e.g. LOCK would break with this approach
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/aborteduploaddetectionplugin.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/aborteduploaddetectionplugin.php b/lib/private/connector/sabre/aborteduploaddetectionplugin.php
index 15dca3a6809..10cca647e8d 100644
--- a/lib/private/connector/sabre/aborteduploaddetectionplugin.php
+++ b/lib/private/connector/sabre/aborteduploaddetectionplugin.php
@@ -53,6 +53,12 @@ class OC_Connector_Sabre_AbortedUploadDetectionPlugin extends Sabre_DAV_ServerPl
*/
public function verifyContentLength($filePath, Sabre_DAV_INode $node = null) {
+ // we should only react on PUT which is used for upload
+ // e.g. with LOCK this will not work, but LOCK uses createFile() as well
+ if ($this->server->httpRequest->getMethod() !== 'PUT' ) {
+ return;
+ }
+
// ownCloud chunked upload will be handled in its own plugin
$chunkHeader = $this->server->httpRequest->getHeader('OC-Chunked');
if ($chunkHeader) {