Issue Bug Closed

#84167Negation Bug in TYPO3 8.7 GuzzleHttp \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl()

Felix Buenemann 03/07/18, 18:56 updated 10/02/18, 10:50

Description

There’s a negation bug in \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl() of TYPO3 8.7.10 that was introduced when the code was converted from curl to GuzzleHttp (see #70056).

The code replaced a check for $content === false in the curl code with !empty($content) in the GuzzleHttp code, which has the consequence of all reponses with a non-empty body being handled like an error and as a result missing the http_code and content_type field in the report.

The bug was introduced in revision 68a6da69a401e083dca1a9e7d368560a52ec0f68 check line 2111 in the old and 2055 in the new code.

The attached patch against the master branch should fix the problem and applies just fine to the 8.7 branch with a line offset.

Reviews 4