[BUGFIX] Use HTTP Status 307 for all page shortcut modes 33/27933/4 33/27933/5
authorChristoph Dörfel <christoph.doerfel@gmail.com>
Fri, 28 Feb 2014 10:22:51 +0000 (11:22 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Wed, 19 Mar 2014 11:13:07 +0000 (12:13 +0100)
Fixes cases where the shortcut page is cached by some
devices leading to exceptions or wrong behaviour.

Resolves: #56423
Releases: 6.2
Change-Id: I71252b13320417ecffa9c28db6af9476d667d58f
Reviewed-on: https://review.typo3.org/27933
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index d95ac2e..a6542c3 100644 (file)
@@ -2971,13 +2971,9 @@ class TypoScriptFrontendController {
                                $parameter .= ',' . $type;
                        }
                        $redirectUrl = $cObj->typoLink_URL(array('parameter' => $parameter));
                                $parameter .= ',' . $type;
                        }
                        $redirectUrl = $cObj->typoLink_URL(array('parameter' => $parameter));
-                       // HTTP Status code header - dependent on shortcut type
-                       $redirectStatus = HttpUtility::HTTP_STATUS_301;
-                       if ($this->originalShortcutPage['shortcut_mode'] == \TYPO3\CMS\Frontend\Page\PageRepository::SHORTCUT_MODE_RANDOM_SUBPAGE) {
-                               $redirectStatus = HttpUtility::HTTP_STATUS_307;
-                       }
+
                        // redirect and exit
                        // redirect and exit
-                       HttpUtility::redirect($redirectUrl, $redirectStatus);
+                       HttpUtility::redirect($redirectUrl, HttpUtility::HTTP_STATUS_307);
                }
        }
 
                }
        }
 
@@ -4846,4 +4842,4 @@ if (version == "n3") {
                $domainData = $this->getDomainDataForPid($targetPid);
                return $domainData ? $domainData['domainName'] : NULL;
        }
                $domainData = $this->getDomainDataForPid($targetPid);
                return $domainData ? $domainData['domainName'] : NULL;
        }
-}
\ No newline at end of file
+}