Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
739f5fda
Commit
739f5fda
authored
Jun 26, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4061 from yiisoft/fix-headers
attempt to fix multiple header issue
parents
69fa11fd
109c4b44
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
CHANGELOG.md
framework/CHANGELOG.md
+1
-0
HeaderCollection.php
framework/web/HeaderCollection.php
+1
-0
Response.php
framework/web/Response.php
+4
-2
No files found.
framework/CHANGELOG.md
View file @
739f5fda
...
...
@@ -53,6 +53,7 @@ Yii Framework 2 Change Log
-
Bug #3817:
`yii\rbac\PhpManager::getChildren()`
returns null instead of expected empty array (qiangxue)
-
Bug #3843: Fixed Menu bug when using
`template`
with
`encodeLabel`
=> false (creocoder, umneeq)
-
Bug #3863: Fixed incorrect js selector for
`\yii\widgets\ActiveForm::errorSummaryCssClass`
when it contains multiple classes (creocoder, umneeq)
-
Bug #3893: Headers did not overwrite default setting by webserver (cebe)
-
Bug #3909:
`Html::to()`
should not prefix base URL to URLs that already contain scheme (qiangxue)
-
Bug #3934: yii.handleAction() in yii.js does not correctly detect if a hyperlink contains useful URL or not (joni-jones, qiangxue)
-
Bug #3968: Messages logged in shutdown functions are not handled (qiangxue)
...
...
framework/web/HeaderCollection.php
View file @
739f5fda
...
...
@@ -28,6 +28,7 @@ class HeaderCollection extends Object implements \IteratorAggregate, \ArrayAcces
*/
private
$_headers
=
[];
/**
* Returns an iterator for traversing the headers in the collection.
* This method is required by the SPL interface `IteratorAggregate`.
...
...
framework/web/Response.php
View file @
739f5fda
...
...
@@ -296,7 +296,6 @@ class Response extends \yii\base\Response
if
(
$this
->
_headers
===
null
)
{
$this
->
_headers
=
new
HeaderCollection
;
}
return
$this
->
_headers
;
}
...
...
@@ -346,8 +345,11 @@ class Response extends \yii\base\Response
$headers
=
$this
->
getHeaders
();
foreach
(
$headers
as
$name
=>
$values
)
{
$name
=
str_replace
(
' '
,
'-'
,
ucwords
(
str_replace
(
'-'
,
' '
,
$name
)));
// set replace for first occurance of header but false afterwards to allow multiple
$replace
=
true
;
foreach
(
$values
as
$value
)
{
header
(
"
$name
:
$value
"
,
false
);
header
(
"
$name
:
$value
"
,
$replace
);
$replace
=
false
;
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment