summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-03-04 17:43:31 +0100
committerGitHub <noreply@github.com>2019-03-04 17:43:31 +0100
commit79ec7bbcf64fb7edc3ef8b2dbe4fee4173736c2e (patch)
treed2a7b43d614d667173c2d2980091ee8a6ff5c996 /apps
parent36b7fc7bef518976de32e3d1280da4c773988e8a (diff)
parent9348e3d2f693b4f278fb2eb13c225f7ea2bbb9bb (diff)
downloadnextcloud-server-79ec7bbcf64fb7edc3ef8b2dbe4fee4173736c2e.tar.gz
nextcloud-server-79ec7bbcf64fb7edc3ef8b2dbe4fee4173736c2e.zip
Merge pull request #13871 from PLUTEX/master
dav: Fix handling of chunked WebDAV upload
Diffstat (limited to 'apps')
-rw-r--r--apps/dav/lib/Connector/Sabre/File.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/dav/lib/Connector/Sabre/File.php b/apps/dav/lib/Connector/Sabre/File.php
index 8aa7d66ba34..fe301d93729 100644
--- a/apps/dav/lib/Connector/Sabre/File.php
+++ b/apps/dav/lib/Connector/Sabre/File.php
@@ -205,7 +205,9 @@ class File extends Node implements IFile {
if (isset($_SERVER['CONTENT_LENGTH'])) {
$expected = $_SERVER['CONTENT_LENGTH'];
}
- throw new Exception('Error while copying file to target location (copied bytes: ' . $count . ', expected filesize: ' . $expected . ' )');
+ if ($expected !== "0") {
+ throw new Exception('Error while copying file to target location (copied bytes: ' . $count . ', expected filesize: ' . $expected . ' )');
+ }
}
// if content length is sent by client: