aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <91878298+come-nc@users.noreply.github.com>2024-09-14 21:18:47 +0200
committerGitHub <noreply@github.com>2024-09-14 21:18:47 +0200
commit6c46c43429e47aa113fe2a58a0529060a81bc7a5 (patch)
tree40bb8ace289d232ecfec894b38c1c40bbefa602c
parent9bfbbd9f39e69507c42c11a3097a829418e6a116 (diff)
parente54eef5ae37c088cb38f1eea9cf8849d2a36c6e1 (diff)
downloadnextcloud-server-6c46c43429e47aa113fe2a58a0529060a81bc7a5.tar.gz
nextcloud-server-6c46c43429e47aa113fe2a58a0529060a81bc7a5.zip
Merge pull request #47971 from nextcloud/fix/do-not-try-to-change-response-code-too-late
fix: Do not try to set HTTP response code on already closed connection
-rw-r--r--lib/private/legacy/OC_Files.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php
index 07caba42ff2..8e23d70c690 100644
--- a/lib/private/legacy/OC_Files.php
+++ b/lib/private/legacy/OC_Files.php
@@ -198,7 +198,8 @@ class OC_Files {
} catch (\OCP\Files\ConnectionLostException $ex) {
self::unlockAllTheFiles($dir, $files, $getType, $view, $filename);
OC::$server->getLogger()->logException($ex, ['level' => \OCP\ILogger::DEBUG]);
- \OC_Template::printErrorPage('Connection lost', $ex->getMessage(), 200);
+ /* We do not print anything here, the connection is already closed */
+ die();
} catch (\Exception $ex) {
self::unlockAllTheFiles($dir, $files, $getType, $view, $filename);
OC::$server->getLogger()->logException($ex);