mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
fix(dav): AddExtraHeadersPlugin should not be handled on error
When a request failed (failed upload) the file is not created, thus this will spam the log with "cannot set extra headers" error. To reproduce use e.g. files_antivirus with eicar test files. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
5acf3878f3
commit
f4151eb052
1 changed files with 5 additions and 0 deletions
|
|
@ -40,6 +40,11 @@ class AddExtraHeadersPlugin extends \Sabre\DAV\ServerPlugin {
|
|||
return;
|
||||
}
|
||||
|
||||
// skip setting the headers if the PUT request failed
|
||||
if ($response->getStatus() >= 400) {
|
||||
return;
|
||||
}
|
||||
|
||||
$node = null;
|
||||
try {
|
||||
$node = $this->server->tree->getNodeForPath($request->getPath());
|
||||
|
|
|
|||
Loading…
Reference in a new issue