public function sendHeaders()
     {
         $response = $this->getResponse();
         $headers = $response->getHeaders();
         $isAjax = $response->getRequest()->isAjax();

         if (isset($headers['Location']) && $response->isSuccess() && !$isAjax) {
             $response->setStatus(AnHttpResponse::SEE_OTHER);
         }

         return parent::sendHeaders();
     }