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

Commit f1b5954

Browse files
committed
Merge branch 'hotfix/252'
Close #252
2 parents e81e871 + 88f6dbd commit f1b5954

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ All notable changes to this project will be documented in this file, in reverse
2424
the method does not raise exceptions (PHP does not allow exceptions in that
2525
method). In particular, this fixes an issue when using AWS S3 streams.
2626

27+
- [#252](https://github.com/zendframework/zend-diactoros/pull/252) provides a
28+
fix to the `SapiEmitterTrait` to ensure that any `Set-Cookie` headers in the
29+
response instance do not override those set by PHP when a session is created
30+
and/or regenerated.
31+
2732
## 1.4.0 - 2017-04-06
2833

2934
### Added

src/Response/SapiEmitterTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ private function emitHeaders(ResponseInterface $response)
6565
{
6666
foreach ($response->getHeaders() as $header => $values) {
6767
$name = $this->filterHeader($header);
68-
$first = true;
68+
$first = $name === 'Set-Cookie' ? false : true;
6969
foreach ($values as $value) {
7070
header(sprintf(
7171
'%s: %s',

0 commit comments

Comments
 (0)