Revert "[BUGFIX] Allow to send multiple HTTP headers with the same name" 39/60839/2
authorBenni Mack <benni@typo3.org>
Wed, 29 May 2019 16:54:01 +0000 (18:54 +0200)
committerBenni Mack <benni@typo3.org>
Tue, 4 Jun 2019 10:11:13 +0000 (12:11 +0200)
This reverts commit 1683f107e72e59737fb389e4623782de0ef472c0.

Reason for revert:
This breaks existing code, as multiple headers are now
sent to the client which were previously overridden.

As long as there is existing code in TYPO3 where header() is
sent, this change can only be done as a breaking change.

Change-Id: Id7444b1455855702143b3fde5629203f252ba07e
Reverts: #88420
Resolves: #88457
Releases: master, 9.5
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60839
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Markus Poerschke <markus@poerschke.nrw>
Reviewed-by: Guido Schmechel <guido.schmechel@brandung.de>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Helmut Hummel <typo3@helhum.io>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Http/AbstractApplication.php

index 74fe660..66627a7 100644 (file)
@@ -74,9 +74,7 @@ abstract class AbstractApplication implements ApplicationInterface
             }
 
             foreach ($response->getHeaders() as $name => $values) {
-                foreach ($values as $value) {
-                    header($name . ': ' . $value, false);
-                }
+                header($name . ': ' . implode(', ', $values));
             }
         }
         $body = $response->getBody();