Removed headers in ErrorHandler.

This commit is contained in:
Qiang Xue
2013-06-14 17:06:01 -04:00
parent 614c28ffb2
commit 172f40aada

View File

@@ -90,6 +90,8 @@ class ErrorHandler extends Component
$useErrorView = !YII_DEBUG || $exception instanceof UserException; $useErrorView = !YII_DEBUG || $exception instanceof UserException;
$response = Yii::$app->getResponse(); $response = Yii::$app->getResponse();
$response->getHeaders()->removeAll();
if ($useErrorView && $this->errorAction !== null) { if ($useErrorView && $this->errorAction !== null) {
$result = Yii::$app->runAction($this->errorAction); $result = Yii::$app->runAction($this->errorAction);
if ($result instanceof Response) { if ($result instanceof Response) {