/** * Return the value of the first found location header * * @param Mage_Core_Controller_Response_Http $response * @return string */ protected function _getRedirectTarget($response) { $headers = $response->getHeaders(); if ($headers) { foreach ($headers as $header) { if ('Location' === $header['name']) { return $header['value']; } } } return ''; }
/** * @param Mage_Core_Controller_Response_Http $response * @return string */ public function getContentType(\Mage_Core_Controller_Response_Http $response) { foreach ($response->getHeaders() as $header) { if (isset($header['name']) && $header['name'] === 'Content-Type' && isset($header['value'])) { return $header['value']; } } return 'text/html; charset=UTF-8'; }