[BUGFIX] Use scheme from EnvironmentVariables for forceAbsoluteUrl 61/50661/2
authorFrans Saris <franssaris@gmail.com>
Tue, 15 Nov 2016 11:46:57 +0000 (12:46 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Wed, 16 Nov 2016 21:00:21 +0000 (22:00 +0100)
Resolves: #78699
Releases: master, 7.6
Change-Id: If238a92e20f2382ad3b37a231992a122eff80826
Reviewed-on: https://review.typo3.org/50661
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Frederic Gaus <frederic.gaus@flagbit.de>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php

index 87d2342..8262ea1 100644 (file)
@@ -6261,7 +6261,7 @@ class ContentObjectRenderer
             $isUrlModified = false;
             // Set scheme and host if not yet part of the URL:
             if (empty($urlParts['host'])) {
-                $urlParts['scheme'] = 'http';
+                $urlParts['scheme'] = $this->getEnvironmentVariable('TYPO3_SSL') ? 'https' : 'http';
                 $urlParts['host'] = $this->getEnvironmentVariable('HTTP_HOST');
                 $urlParts['path'] = '/' . ltrim($urlParts['path'], '/');
                 // absRefPrefix has been prepended to $url beforehand