Fixing incorrect content type headers from being set, when an action contains a requestAction to an action with a different Content-Type. Also populating RequestHandler->params as it was always empty.

Fixes #1445
This commit is contained in:
mark_story 2011-01-18 08:28:16 -05:00
parent cfce0e45d3
commit 932533c5c8

View file

@ -202,6 +202,7 @@ class RequestHandlerComponent extends Object {
if (isset($controller->params['url']['ext'])) {
$this->ext = $controller->params['url']['ext'];
}
$this->params = $controller->params;
$this->_set($settings);
}
@ -738,7 +739,7 @@ class RequestHandlerComponent extends Object {
if (!empty($options['attachment'])) {
$this->_header("Content-Disposition: attachment; filename=\"{$options['attachment']}\"");
}
if (Configure::read() < 2 && !defined('CAKEPHP_SHELL')) {
if (Configure::read() < 2 && !defined('CAKEPHP_SHELL') && empty($this->params['requested'])) {
$this->_header($header);
}
$this->__responseTypeSet = $cType;