Skip to content

Commit

Permalink
Merge pull request #47981 from nextcloud/backport/47971/stable30
Browse files Browse the repository at this point in the history
[stable30] fix: Do not try to set HTTP response code on already closed connection
  • Loading branch information
come-nc authored Sep 15, 2024
2 parents fbfead3 + 6779729 commit f2deb77
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/legacy/OC_Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,8 @@ public static function get($dir, $files, $params = null) {
} 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);
Expand Down

0 comments on commit f2deb77

Please sign in to comment.