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

Commit

Permalink
Merge branch 'hotfix/135'
Browse files Browse the repository at this point in the history
Close #135
  • Loading branch information
weierophinney committed Jan 4, 2016
2 parents a2bdb46 + a014f1a commit 4d54fde
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

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

## 1.3.3 - TBD
## 1.3.3 - 2016-01-04

### Added

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

### Fixed

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

## 1.3.2 - 2015-12-22

Expand Down
5 changes: 0 additions & 5 deletions src/ServerRequestFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,6 @@ public static function marshalHeaders(array $server)
{
$headers = [];
foreach ($server as $key => $value) {
if (strpos($key, 'HTTP_COOKIE') === 0) {
// Cookies are handled using the $_COOKIE superglobal
continue;
}

if ($value && strpos($key, 'HTTP_') === 0) {
$name = strtr(substr($key, 5), '_', ' ');
$name = strtr(ucwords(strtolower($name)), ' ', '-');
Expand Down
1 change: 1 addition & 0 deletions test/ServerRequestFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public function testMarshalsExpectedHeadersFromServerArray()
];

$expected = [
'cookie' => 'COOKIE',
'authorization' => 'token',
'content-type' => 'application/json',
'accept' => 'application/json',
Expand Down

0 comments on commit 4d54fde

Please sign in to comment.