#104828config.contentObjectExceptionHandler sends 200 HTTP Status and regular cache headers
Description
If using TYPO3 in Frontend with config.contentObjectExceptionHandler=0 and a CDN in front, then TYPO3 just shows the page with an error message and the error code, and thus, replaces the plugin rendering, but it sends a HTTP Response with status code 200, and the configured headers.
If you use a CDN, and use manual cache purge / flush logic, it might happen that a page (let’s say with a career job offering listing) with this error is cached in the CDN for multiple hours or even days, because of a broken state when the cache was empty the last time.
Instead, a 50x response should be sent if ContentObjectRenderer catches any exception, to ensure that TYPO3 Frontend never sends such information as cached response.
Reviews 1
Related issues 2
History 56
-
Benni Mack changed subject
config.contentObjectExceptionHandler sends 200config.contentObjectExceptionHandler sends 200 HTTP Status and regular cache headers <span data-processor="relativetime" data-value="2024-09-05T08:45:29+00:00" > 09/05/24, 08:45 </span> -
Garvin Hicking changed Related to #104321 <span data-processor="relativetime" data-value="2024-09-05T09:12:20+00:00" > 09/05/24, 09:12 </span>
-
Garvin Hicking commented <span data-processor="relativetime" data-value="2024-09-05T09:15:52+00:00" > 09/05/24, 09:15 </span>
-
Benni Mack commented <span data-processor="relativetime" data-value="2024-09-05T11:08:31+00:00" > 09/05/24, 11:08 </span>
Garvin Hicking wrote in #note-3:
> Check related #104321 – possibly the PropagateResponseException needs a $code in the constructor calls, where a 5xx occurs, available through the ImmediateResponseException.Yes, but I’m talking about another issue – namely that the \Throwable is caught in ContentObjectRenderer where just a string is returned from the contentObjectExceptionHandler = 0.
-
Benni Mack changed Related to #105591 <span data-processor="relativetime" data-value="2024-11-14T08:39:50+00:00" > 11/14/24, 08:39 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 97850 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-19T16:59:29+00:00" > 11/19/26, 16:59 </span>
Check related #104321 – possibly the PropagateResponseException needs a $code in the constructor calls, where a 5xx occurs, available through the ImmediateResponseException.