[BUGFIX] Use Guzzle request to fetch external error page content
TYPO3 provides the ability to configure different error handlers for specific (or all) error codes, as well as the error handler type to use (core handler or custom). The `\TYPO3\CMS\Core\Error\PageErrorHandler\PageContentErrorHandler` allows to specify a target using the link handler. The default config allows to define `LinkService::TYPE_PAGE` and `LinkService::TYPE_URL`. After implementing and stabilizing the TYPO3 sub-request feature, this particular error handler has been refactored to use an internal sub-request to resolve the error page content: An external URL not matching the same instance or having a page unavailable within the TYPO3 instance will not return any content. This change modifies the `PageContentErrorHandler` to send a Guzzle request for an external URL instead of using internal sub-requests, even if it would access the originating instance again. A limitation is that the requested URL **must** return a HTTP status-code 200. A custom request header is attached to this request. It is then checked to avoid recurring errors or loops in the page-resolving workflow. Resolves: #103399 Related: #98396 Related: #94402 Releases: main, 12.4 Change-Id: If09158abd2aa9246bcb7a4fa41a0ad6e4a0f942c Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83947 Reviewed-by:Thomas Hohn <tho@gyldendal.dk> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Benni Mack <benni@typo3.org> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Christian Kuhn <lolli@schwarzbu.ch> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
Stefan Bürk <stefan@buerk.tech>
Showing
Please register or sign in to comment