[BUGFIX] Restore getUrl support for list of headers 46/56046/7
authorFelix Buenemann <felix.buenemann@gmail.com>
Wed, 7 Mar 2018 22:39:24 +0000 (23:39 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Wed, 14 Mar 2018 16:44:17 +0000 (17:44 +0100)
commit662fb9ae46a094b84d735aaebd0a3fef66b54f89
tree98e0bf111f56a9c5a0bd96a5bd5b66fae86ae3df
parentd8e0000ffe494d00d3157e0223deb382a12b20fe
[BUGFIX] Restore getUrl support for list of headers

The change of \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl()
from cURL to GuzzleHttp the format of the $requestHeaders param was
implicitly changed from an array of header strings to an associative
array where the key is the header name and the value is either a single
or an array of values for that header.

This adds back support for the old list of headers format by detecting a
non-associative array and converting it to the Guzzle key/value(s) style.

At the same time the 'old' way is deprecated.

Resolves: #84171
Related: #70056
Releases: master, 8.7
Change-Id: I41b23993957288dfd5294129fa8039aab717461d
Reviewed-on: https://review.typo3.org/56046
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Documentation/Changelog/master/Deprecation-84171-AddingGeneralUtilitygetUrlRequestHeadersAsNon-associativeArrayAreDeprecated.rst [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/GeneralUtilityTest.php
typo3/sysext/core/Tests/UnitDeprecated/Utility/GeneralUtilityTest.php [new file with mode: 0644]
typo3/sysext/frontend/Classes/Controller/ErrorController.php