[BUGFIX] Send correct content type for cached Extbase actions
The setContentType method on TyposcripFrontendController was introduced to allow Extbase plugins to change the content-type header of the server http response. However this currently only works, when the Extbase plugin action is uncached. Once a plugin, that is rendered on a page ist cached in page cache, the content type of subsequent requests is always "text/html", because the value of the contentType property is not stored in cache. Storing this value into cache allows creating e.g. Json APIs as Extbase Plugins, that can be fully cached without adding hacks like modifying config.additionalHeaders Resolves: #99373 Releases: main, 11.5 Change-Id: Ibf00c9438d8763ef9d32c6ad7d00a44d3137ba13 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77269 Tested-by:core-ci <typo3@b13.com> Reviewed-by:
Helmut Hummel <typo3@helhum.io> Tested-by:
Helmut Hummel <typo3@helhum.io>
Showing
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial/Classes/Controller/QueueController.php 1 addition, 4 deletions...ions/irre_tutorial/Classes/Controller/QueueController.php
- typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield/Classes/Controller/QueueController.php 1 addition, 4 deletions..._irre_foreignfield/Classes/Controller/QueueController.php
- typo3/sysext/extbase/Classes/Core/Bootstrap.php 5 additions, 15 deletionstypo3/sysext/extbase/Classes/Core/Bootstrap.php
- typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php 4 additions, 1 deletion...ntend/Classes/Controller/TypoScriptFrontendController.php
Please register or sign in to comment