[BUGFIX] Restore getUrl support for list of headers 49/56149/3
authorFelix Buenemann <felix.buenemann@gmail.com>
Wed, 7 Mar 2018 22:39:24 +0000 (23:39 +0100)
committerSusanne Moog <susanne.moog@typo3.org>
Thu, 15 Mar 2018 20:25:42 +0000 (21:25 +0100)
commit284411c14271eead0fb7a172bebcad83d713478f
tree3a1aba4919dcc82b6f6f795ceb023df1218912cf
parent031dd2c77de1a285ba619cb63075174656c95b88
[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/56149
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/Tests/Unit/Utility/GeneralUtilityTest.php