summaryrefslogtreecommitdiffstats
path: root/lib/private/connector
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-05-21 17:52:13 +0200
committerRobin Appelman <icewind@owncloud.com>2015-06-01 13:22:56 +0200
commit668fafd4d2e56ee47ec67ba0a9768b7e5c3ccafd (patch)
tree13a50c3e55bf8a50fe5961caee8a3f03c9c35051 /lib/private/connector
parent2f4f468399d316157979f747d2418fb5cff8d3e0 (diff)
downloadnextcloud-server-668fafd4d2e56ee47ec67ba0a9768b7e5c3ccafd.tar.gz
nextcloud-server-668fafd4d2e56ee47ec67ba0a9768b7e5c3ccafd.zip
close file handle after sending sabre response
Diffstat (limited to 'lib/private/connector')
-rw-r--r--lib/private/connector/sabre/filesplugin.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/filesplugin.php b/lib/private/connector/sabre/filesplugin.php
index 3c79f5a7a2a..09d931be606 100644
--- a/lib/private/connector/sabre/filesplugin.php
+++ b/lib/private/connector/sabre/filesplugin.php
@@ -89,6 +89,12 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin {
$this->server->on('afterBind', array($this, 'sendFileIdHeader'));
$this->server->on('afterWriteContent', array($this, 'sendFileIdHeader'));
$this->server->on('afterMethod:GET', [$this,'httpGet']);
+ $this->server->on('afterResponse', function($request, ResponseInterface $response) {
+ $body = $response->getBody();
+ if (is_resource($body)) {
+ fclose($body);
+ }
+ });
}
/**