Review main Merged

63389[FEATURE] Allow PageContentErrorHandler to resolve pages with sub requests

Christian Eßl CR +2 V +2 Normal +89 −41 updated 02/24/20, 20:14

Commit message

The PageContentErrorHandler provided by the core can take in either a
URL or a page uid for resolving an error page in the frontend. In both
cases, the class would then start a Guzzle/cURL request to fetch the
error page content.
This has now been changed for internal pages, where a page uid has been
given. In this case, the PageContentErrorHandler will now dispatch an
internal SubRequest instead, to avoid an unnecessary cURL call.

In staging environments, the website would often be access protected
with basic auth options (for example a .htpasswd auth file on Apache
Webservers). In such a case, error pages with the default
PageContentErrorHandler would have failed before, as the internal cURL
call for fetching the error page was lacking these required basic auth
options.
For internal pages, a sub request is now used, bypassing the need for
an external cURL call.

This solution is mostly based on Benni Mack's
LocalPageContentErrorHandler with his approval.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 2