mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
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:
parent
cfce0e45d3
commit
932533c5c8
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue