This commit is contained in:
2021-03-30 19:30:10 +08:00
parent 942b0cec0f
commit c85099b1b1
2 changed files with 14 additions and 2 deletions
+12 -1
View File
@@ -283,6 +283,18 @@ class Response extends HttpService
}
/**
* @param int $statusCode
* @param string $message
* @return mixed
* @throws Exception
*/
public function close($statusCode = 200, $message = ''): mixed
{
return $this->send($message, $statusCode);
}
/**
* @param string $path
* @param int $offset
@@ -296,7 +308,6 @@ class Response extends HttpService
$stat = fstat($open);
$this->headers(null);
while ($file = fread($open, $limit)) {
$this->response->write($file);
fseek($open, $offset);