Added missing response::send() after refactoring
This commit is contained in:
@@ -65,6 +65,7 @@ class AvatarFile extends BaseController
|
|||||||
$this->response->withContentType('image/jpeg');
|
$this->response->withContentType('image/jpeg');
|
||||||
|
|
||||||
if ($this->request->getHeader('If-None-Match') !== '"'.$etag.'"') {
|
if ($this->request->getHeader('If-None-Match') !== '"'.$etag.'"') {
|
||||||
|
$this->response->send();
|
||||||
$this->render($filename, $size);
|
$this->render($filename, $size);
|
||||||
} else {
|
} else {
|
||||||
$this->response->status(304);
|
$this->response->status(304);
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class Captcha extends BaseController
|
|||||||
*/
|
*/
|
||||||
public function image()
|
public function image()
|
||||||
{
|
{
|
||||||
$this->response->withContentType('image/jpeg');
|
$this->response->withContentType('image/jpeg')->send();
|
||||||
|
|
||||||
$builder = new CaptchaBuilder;
|
$builder = new CaptchaBuilder;
|
||||||
$builder->build();
|
$builder->build();
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ class FileViewer extends BaseController
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
$this->response->send();
|
||||||
$this->objectStorage->output($file['path']);
|
$this->objectStorage->output($file['path']);
|
||||||
} catch (ObjectStorageException $e) {
|
} catch (ObjectStorageException $e) {
|
||||||
$this->logger->error($e->getMessage());
|
$this->logger->error($e->getMessage());
|
||||||
@@ -100,6 +101,8 @@ class FileViewer extends BaseController
|
|||||||
$this->response->status(304);
|
$this->response->status(304);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
$this->response->send();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$this->objectStorage->output($filename);
|
$this->objectStorage->output($filename);
|
||||||
@@ -124,6 +127,7 @@ class FileViewer extends BaseController
|
|||||||
try {
|
try {
|
||||||
$file = $this->getFile();
|
$file = $this->getFile();
|
||||||
$this->response->withFileDownload($file['name']);
|
$this->response->withFileDownload($file['name']);
|
||||||
|
$this->response->send();
|
||||||
$this->objectStorage->output($file['path']);
|
$this->objectStorage->output($file['path']);
|
||||||
} catch (ObjectStorageException $e) {
|
} catch (ObjectStorageException $e) {
|
||||||
$this->logger->error($e->getMessage());
|
$this->logger->error($e->getMessage());
|
||||||
|
|||||||
Reference in New Issue
Block a user