Review main Merged

70885[TASK] Send debug information of cached page as HTTP Header

Benni Mack CR +2 V +2 Easy +20 −3 updated 09/06/21, 11:21

Commit message

If config.debug = 1 is added, and a page is loaded
from cache, TYPO3 usually sent
"<!-- Cached page generated 03-09-21 09:48. Expires 04-09-21 09:48 -->"
at the end of the HTTP Response Body.

This is especially painful when dealing with JSON output,
where this breaks output if TYPO3 should return JSON (e.g.
from a USER function).

This change sends the same information as a HTTP
Response Header named "X-TYPO3-Debug-Cache" including
the same information, and not touching the actual rendering.

Review

  • Code review CR +2 Done
    • Helmut Hummel +2
    • Oli Bartsch +1
    • Guido Schmechel +1
    • Marcin Sągol +1
  • Verified V +2 Done
    • Helmut Hummel +2
    • Guido Schmechel +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 912

  1. Benni Mack uploaded patch set 1 09/03/21, 15:02

  2. Benni Mack updated the commit message in patch set 2 09/03/21, 15:02

  3. Benni Mack uploaded patch set 3 09/03/21, 15:09

  4. Oli Bartsch voted on patch set 3 CR +1 09/03/21, 15:11

  5. core-ci voted on patch set 2 V +1 09/03/21, 15:15 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16202

  6. core-ci voted on patch set 1 V +1 09/03/21, 15:22 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16201

  7. core-ci voted on patch set 3 V +1 09/03/21, 15:28 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16203

  8. Guido Schmechel voted on patch set 3 V +1 CR +1 09/04/21, 11:25

  9. Marcin Sągol commented on patch set 3 CR +1 09/06/21, 07:44

    TypoScriptFrontendController.php:1662

    Maybe we can skip `Cached page generated` text and just use `Generated: xxx. Expires: xxx` since we know it is about cache timestamps by header name?
  10. Helmut Hummel voted on patch set 3 V +2 CR +2 09/06/21, 11:21

  11. Helmut Hummel commented on patch set 3 09/06/21, 11:21

    TypoScriptFrontendController.php:1662 Reply

    can be fixed/optimised in subsequent changes
  12. Helmut Hummel merged patch set 4 09/06/21, 11:21