Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 4d54fde

Browse files
committed
Merge branch 'hotfix/135'
Close #135
2 parents a2bdb46 + a014f1a commit 4d54fde

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
All notable changes to this project will be documented in this file, in reverse chronological order by release.
44

5-
## 1.3.3 - TBD
5+
## 1.3.3 - 2016-01-04
66

77
### Added
88

@@ -18,7 +18,11 @@ All notable changes to this project will be documented in this file, in reverse
1818

1919
### Fixed
2020

21-
- Nothing.
21+
- [#135](https://github.com/zendframework/zend-diactoros/pull/135) fixes the
22+
behavior of `ServerRequestFactory::marshalHeaders()` to no longer omit
23+
`Cookie` headers from the aggregated headers. While the values are parsed and
24+
injected into the cookie params, it's useful to have access to the raw headers
25+
as well.
2226

2327
## 1.3.2 - 2015-12-22
2428

src/ServerRequestFactory.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,6 @@ public static function marshalHeaders(array $server)
198198
{
199199
$headers = [];
200200
foreach ($server as $key => $value) {
201-
if (strpos($key, 'HTTP_COOKIE') === 0) {
202-
// Cookies are handled using the $_COOKIE superglobal
203-
continue;
204-
}
205-
206201
if ($value && strpos($key, 'HTTP_') === 0) {
207202
$name = strtr(substr($key, 5), '_', ' ');
208203
$name = strtr(ucwords(strtolower($name)), ' ', '-');

test/ServerRequestFactoryTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public function testMarshalsExpectedHeadersFromServerArray()
6969
];
7070

7171
$expected = [
72+
'cookie' => 'COOKIE',
7273
'authorization' => 'token',
7374
'content-type' => 'application/json',
7475
'accept' => 'application/json',

0 commit comments

Comments
 (0)