Skip to content

Commit

Permalink
Merge pull request #13871 from PLUTEX/master
Browse files Browse the repository at this point in the history
dav: Fix handling of chunked WebDAV upload
  • Loading branch information
MorrisJobke authored Mar 4, 2019
2 parents 36b7fc7 + 9348e3d commit 79ec7bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/dav/lib/Connector/Sabre/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ public function put($data) {
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:
Expand Down

0 comments on commit 79ec7bb

Please sign in to comment.