[BUGFIX] Use GeneralUtility::getUrl in DocumentationService->fetchDocument 63/50663/2
authorClaus Due <claus@namelesscoder.net>
Tue, 15 Nov 2016 14:09:57 +0000 (15:09 +0100)
committerAndreas Fernandez <typo3@scripting-base.de>
Fri, 18 Nov 2016 11:20:41 +0000 (12:20 +0100)
This avoids issues with frequent incompatibilities with SSLv2
in libcurl.

Change-Id: I7eae2d266da2d11cc809603974f73f4a9c089467
Resolves: #78703
Releases: 7.6
Reviewed-on: https://review.typo3.org/50663
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
typo3/sysext/documentation/Classes/Service/DocumentationService.php

index e4f1f8f..9af4593 100644 (file)
@@ -181,11 +181,9 @@ class DocumentationService
         }
 
         if (!$hasArchive) {
-            /** @var $http \TYPO3\CMS\Core\Http\HttpRequest */
-            $http = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Http\HttpRequest::class, $packageUrl);
-            $response = $http->send();
-            if ($response->getStatus() == 200) {
-                GeneralUtility::writeFileToTypo3tempDir($absolutePathToZipFile, $response->getBody());
+            $content = GeneralUtility::getUrl($packageUrl);
+            if ($content) {
+                GeneralUtility::writeFileToTypo3tempDir($absolutePathToZipFile, $content);
             }
         }