summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorBenjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>2023-09-06 09:16:55 +0200
committerBenjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>2023-09-06 09:22:06 +0200
commit8c7017679d9a644a7103788e5b55780febe12aaf (patch)
treec0335e7eca89eb98859ebd1e20f1926632fa66b0 /lib/public
parent33b05ce7ebc96b8ef14e23772ab5734fc57c5aa1 (diff)
downloadnextcloud-server-8c7017679d9a644a7103788e5b55780febe12aaf.tar.gz
nextcloud-server-8c7017679d9a644a7103788e5b55780febe12aaf.zip
Detect aborted connection in OC\Files\View and stop writing data to the output buffer
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/Files/ConnectionLostException.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/public/Files/ConnectionLostException.php b/lib/public/Files/ConnectionLostException.php
new file mode 100644
index 00000000000..8e5deb99b46
--- /dev/null
+++ b/lib/public/Files/ConnectionLostException.php
@@ -0,0 +1,33 @@
+<?php
+
+declare(strict_types=1);
+
+/**
+ * @copyright Copyright (c) 2016, ownCloud, Inc.
+ *
+ * @author Côme Chilliet <come.chilliet@nextcloud.com>
+ *
+ * @license AGPL-3.0
+ *
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
+ *
+ */
+
+namespace OCP\Files;
+
+/**
+ * Exception for lost connection with the
+ * @since 25.0.11
+ */
+class ConnectionLostException extends \RuntimeException {
+}