diff --git a/src/HTTP/Response/Sender/DefaultResponseSenderStrategy.php b/src/HTTP/Response/Sender/DefaultResponseSenderStrategy.php index 97caebe438e7..64ea1446ebad 100644 --- a/src/HTTP/Response/Sender/DefaultResponseSenderStrategy.php +++ b/src/HTTP/Response/Sender/DefaultResponseSenderStrategy.php @@ -87,7 +87,14 @@ public function sendResponse(ResponseInterface $response): void //render all headers foreach (array_keys($response->getHeaders()) as $key) { - header("$key: " . $response->getHeaderLine($key)); + // See Mantis #37385. + if (strtolower($key) === 'set-cookie') { + foreach ($response->getHeader($key) as $header) { + header("$key: " . $header, false); + } + } else { + header("$key: " . $response->getHeaderLine($key)); + } } //rewind body stream