diff options
author | Morris Jobke <hey@morrisjobke.de> | 2019-03-05 10:05:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 10:05:25 +0100 |
commit | 6e5a93026c2077b3714490ab07f97eccfcf807de (patch) | |
tree | 17e552931b4b1c5d4371af8e5ac4ea683755d385 | |
parent | 0f95b95a24c2862953c480de59dd0b213a4e584c (diff) | |
parent | 6c5c01974f68c047c4688ba1ee4be8ca0fe5d911 (diff) | |
download | nextcloud-server-6e5a93026c2077b3714490ab07f97eccfcf807de.tar.gz nextcloud-server-6e5a93026c2077b3714490ab07f97eccfcf807de.zip |
Merge pull request #14517 from nextcloud/backport/13871/stable15
[stable15] dav: Fix handling of chunked WebDAV upload
-rw-r--r-- | apps/dav/lib/Connector/Sabre/File.php | 4 |
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 d2d9420292f..3c42f66a04a 100644 --- a/apps/dav/lib/Connector/Sabre/File.php +++ b/apps/dav/lib/Connector/Sabre/File.php @@ -208,7 +208,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: |