Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(dav): Fix quota check for chunk upload
Do not ignore OC-Total-Length when Content-Length and
 X-Expected-Entity-Length are missing

Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc authored and backportbot[bot] committed Apr 4, 2024
commit a007651d202aada80d865017e12f676f8ed9c88d
10 changes: 6 additions & 4 deletions apps/dav/lib/Connector/Sabre/QuotaPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,13 @@ public function getLength() {
}

$ocLength = $req->getHeader('OC-Total-Length');
if (is_numeric($length) && is_numeric($ocLength)) {
return max($length, $ocLength);
if (!is_numeric($ocLength)) {
return $length;
}

return $length;
if (!is_numeric($length)) {
return $ocLength;
}
return max($length, $ocLength);
}

/**
Expand Down