Review main Merged

72184[BUGFIX] Make external page error handling work again

Benni Mack CR +2 V +2 Easy +20 −4 updated 11/16/21, 09:35

Commit message

In recent TYPO3 v11.5.x versions, the error handling for Frontend
pages did cache the external PSR-7 Response (by guzzle) in the
pages cache. However, if the error page was fetched the second time,
the Response object from the cache did not have a valid stream anymore,
thus resulting in an array.

This change now caches the body + headers for the page (still, only
when a 200 response code was returned), and re-builds a clean Response
object.

Review

  • Code review CR +2 Done
    • Oliver Hader +2
    • Oli Bartsch +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Oliver Hader +2
    • Oli Bartsch +1
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 3

Files 1

Review log 1116

  1. Benni Mack uploaded patch set 1 11/15/21, 20:13

  2. Benni Mack updated the commit message in patch set 2 11/15/21, 20:16

  3. Benni Mack commented on patch set 3 11/15/21, 20:21

    Published edit on patch set 2.
  4. Benni Mack commented on patch set 4 11/15/21, 20:21

    Published edit on patch set 3.
  5. core-ci voted on patch set 1 V -1 11/15/21, 20:31 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19319

  6. Benni Mack uploaded patch set 5 11/15/21, 20:31

  7. core-ci voted on patch set 3 V -1 11/15/21, 20:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19321

  8. core-ci voted on patch set 2 V -1 11/15/21, 20:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19320

  9. core-ci voted on patch set 4 V -1 11/15/21, 20:34 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19322

  10. core-ci voted on patch set 5 V +1 11/15/21, 20:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/19323

  11. Oli Bartsch commented on patch set 5 11/15/21, 21:05

    PageContentErrorHandler.php:162

    Could we use the PSR-17 factories instead? ResponseFactors e.g. is already present in this class.
  12. Benni Mack commented on patch set 5 11/15/21, 21:12

    PageContentErrorHandler.php:162 Reply

    we can't, because we cannot set "ALL" headers at once by using factories :(
  13. Oli Bartsch commented on patch set 5 V +1 CR +1 11/15/21, 21:42

    PageContentErrorHandler.php:162 Reply

    Ack
  14. Oliver Hader voted on patch set 5 V +2 CR +2 11/16/21, 09:06

  15. Oliver Hader merged patch set 6 11/16/21, 09:06

  16. Christian Kuhn voted on patch set 6 V +1 CR +1 11/16/21, 09:35