Project

General

Profile

Actions

Bug #88420

closed

HTTP Headers are incorrectly send when using PSR-15 middleware

Added by Markus Poerschke almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-05-23
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When sending HTTP headers, the values of the headers are combined with a comma, if multiple headers exists.

For example this hinders for example, that multiple cookies can be set at the same time.

Example:

Given you have the following code in a middleware

$response = $response->withAddedHeader('Set-Cookie', 'my_session_a=1');
$response = $response->withAddedHeader('Set-Cookie', 'my_session_a=2');

return $response;

The expected output is, that two headers are set:

Set-Cookie: my_session_a=1
Set-Cookie: my_session_b=2

But instead the values are combined:

Set-Cookie: my_session_a=1, my_session_b=2

This behaviors has the impact, that only the "my_session_a" cookie is set. The other is ignored.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #88457: Revert "Allow to send multiple HTTP headers with the same name"ClosedBenni Mack2019-05-29

Actions
Related to TYPO3 Core - Bug #88482: Allow multi line headers for "Set-Cookie" headersClosed2019-06-03

Actions
Actions

Also available in: Atom PDF