close file handle after sending sabre response
This commit is contained in:
parent
2f4f468399
commit
668fafd4d2
1 changed files with 6 additions and 0 deletions
|
@ -89,6 +89,12 @@ class FilesPlugin extends \Sabre\DAV\ServerPlugin {
|
||||||
$this->server->on('afterBind', array($this, 'sendFileIdHeader'));
|
$this->server->on('afterBind', array($this, 'sendFileIdHeader'));
|
||||||
$this->server->on('afterWriteContent', array($this, 'sendFileIdHeader'));
|
$this->server->on('afterWriteContent', array($this, 'sendFileIdHeader'));
|
||||||
$this->server->on('afterMethod:GET', [$this,'httpGet']);
|
$this->server->on('afterMethod:GET', [$this,'httpGet']);
|
||||||
|
$this->server->on('afterResponse', function($request, ResponseInterface $response) {
|
||||||
|
$body = $response->getBody();
|
||||||
|
if (is_resource($body)) {
|
||||||
|
fclose($body);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue