Actions
Bug #88420
closedHTTP Headers are incorrectly send when using PSR-15 middleware
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.
Actions