ActionController: Ensure to utilize the response to redirect and exit

This commit is contained in:
Johannes Meyer 2017-06-19 09:11:12 +02:00
parent df04c0f837
commit 8ee6e763a6
1 changed files with 4 additions and 22 deletions

View File

@ -415,33 +415,15 @@ class ActionController extends Zend_Controller_Action
protected function redirectXhr($url)
{
if (! $url instanceof Url) {
$url = Url::fromPath($url);
}
if ($this->rerenderLayout) {
$this->getResponse()->setHeader('X-Icinga-Rerender-Layout', 'yes');
}
if ($this->reloadCss) {
$this->getResponse()->setHeader('X-Icinga-Reload-Css', 'now');
}
$this->shutdownSession();
$this->getResponse()
->setHeader('X-Icinga-Redirect', rawurlencode($url->getAbsoluteUrl()))
->sendHeaders();
exit;
->setReloadCss($this->reloadCss)
->setRerenderLayout($this->rerenderLayout)
->redirectAndExit($url);
}
protected function redirectHttp($url)
{
if (! $url instanceof Url) {
$url = Url::fromPath($url);
}
$this->shutdownSession();
$this->_helper->Redirector->gotoUrlAndExit($url->getRelativeUrl());
$this->getResponse()->redirectAndExit($url);
}
/**