Review main Merged

89947[BUGFIX] Properly set multi cache tag headers on Windows

Sascha Nowak CR +2 V +2 Easy +1 −1 updated 07/01/25, 10:13

Commit message

This patch prevents to rely on the wordwrap default break
parameter and explicitly uses the same linebreak ("\n")
values for explode and wordwrap.

This allows to properly send out the HTTP cache tag
headers split into multiple distinct values, so no
wrong CR/LF header values are sent.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Christian Kuhn +1
    • core-ci +1 CI

Issues 1

Files 1

Review log 1317

  1. Sascha Nowak uploaded patch set 1 06/30/25, 18:34

  2. core-ci voted on patch set 1 V +1 06/30/25, 18:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81148

  3. Garvin Hicking updated the commit message in patch set 2 V +1 06/30/25, 21:24

  4. Garvin Hicking voted on patch set 2 CR +1 V +1 06/30/25, 21:24

  5. core-ci voted on patch set 2 V +1 06/30/25, 21:31 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81150

  6. Stefan Bürk commented on patch set 2 07/01/25, 03:47

    If I get the issue right, the issue is that TYPO3 is hosted on a windows server with a windows version of PHP, where `PHP_EOL` is compiled with `\r\n` instead of `\n` like it is for linux/unix based versions. Should we not replace `PHP_EOL` here with constant `LF` instead or use `\n` directly ?
  7. Stefan Bürk commented on patch set 2 CR -1 07/01/25, 04:00

    Reply

    And should we replace/remove `\r` first before dealing with line breaks ? > https://forge.typo3.org/issues/106898#note-7 > I used Windows with Laragon. > I will test your line after my holiday. Using `LF` or `\n` for the explode would match the default 3rd argument value `\n` before overriding it with PHP_EOL .. which is the same with a linux compiled php version but `\r\n` with a windows compiled one ....

    CacheDataCollectorAttribute.php:65

    ```suggestion foreach (explode("\n", wordwrap(implode(' ', $cacheTags), self::MAX_CACHE_TAGS_HEADER_LENGTH, "\n")) as $delta => $tags) { ``` Explode on the same value used by default for wordwrap (https://www.php.net/manual/en/function.wordwrap.php#refsect1-function.wordwrap-description) .. setting it for wordwrap to to be sure on windows-compiled php version (don't have one and cannot find infos about wordwrap behaviour on windows).
  8. Sascha Nowak uploaded patch set 3 CR +1 V +1 07/01/25, 07:15

  9. Sascha Nowak commented on patch set 3 07/01/25, 07:15

    CacheDataCollectorAttribute.php:65 Reply

    Done
  10. Sascha Nowak commented on patch set 3 07/01/25, 07:15

    Reply

    Done
  11. core-ci voted on patch set 3 V +1 07/01/25, 07:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81165

  12. Christian Kuhn voted on patch set 3 CR +1 07/01/25, 07:45

  13. Stefan Bürk updated the commit message in patch set 4 CR +1 V +1 07/01/25, 07:48

  14. core-ci voted on patch set 4 V +1 07/01/25, 07:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/81166

  15. Christian Kuhn voted on patch set 4 CR +1 V +1 07/01/25, 09:25

  16. Stefan Bürk voted on patch set 4 CR +2 V +2 07/01/25, 10:06

  17. Stefan Bürk merged patch set 5 07/01/25, 10:13