$this->autoRender = false;
$this->response->header("HTTP/1.1 200 OK");
$this->response->header("Pragma: public");
$this->response->header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
$this->response->header("Cache-Control: private", false);
//$this->response->header("Content-type: image/png"); //tried also
$this->response->type('jpg');
$this->response->body(readfile($file));
return $this->response;
总是返回 Content-Type: text/html; 字符集=UTF-8。
谢谢