Review main Merged

70677[BUGFIX] Add "308 Permanent Redirect" HTTP status to redirects

Mathias Brodala CR +2 V +2 Easy +43 −4 updated 09/09/21, 07:53

Commit message

Also introduce groups for the HTTP status items to make the distinction
between 301/302/303 (may change HTTP method to get) and 307/308 (keep
HTTP method) clear.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Rick Septer +1
    • Jeroen Schutte +1
    • Guido Schmechel +1
    • Richard Haeser +1
    • Riny van Tiggelen +1
    • Jorgen van der Kroon +1
    • Xavier Perseguers +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Rick Septer +1
    • Jeroen Schutte +1
    • Guido Schmechel +1
    • Riny van Tiggelen +1
    • Jorgen van der Kroon +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1720

  1. Mathias Brodala uploaded patch set 1 08/18/21, 10:50

  2. Mathias Brodala updated the commit message in patch set 2 08/18/21, 10:52

  3. Oli Bartsch commented on patch set 2 08/18/21, 11:10

    sys_redirect.php:215

    Let's also localize the group labels.
  4. core-ci voted on patch set 1 V +1 08/18/21, 11:13 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15262

  5. core-ci voted on patch set 2 V +1 08/18/21, 11:20 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15263

  6. Mathias Brodala uploaded patch set 3 08/18/21, 11:20

  7. Mathias Brodala commented on patch set 3 08/18/21, 11:21

    sys_redirect.php:215 Reply

    True, forgot about that in the end. This is fixed now.
  8. core-ci voted on patch set 3 V +1 08/18/21, 11:36 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15265

  9. Guido Schmechel commented on patch set 3 V +1 CR +1 08/18/21, 19:55

    I like these small improvements :-) Tests are all based on the 307 status. But it would not be a gain to add 301 or 308 tests. Do we also have to think about these redirect codes? I noticed that during the review. (Of course in another issue/patch) const HTTP_STATUS_304 = 'HTTP/1.1 304 Not Modified'; const HTTP_STATUS_305 = 'HTTP/1.1 305 Use Proxy';
  10. Mathias Brodala commented on patch set 3 08/19/21, 06:32

    Reply

    The 304 code is not really a redirect code since it tells the client that nothing needs to be done. So there is e.g. no "Location" header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304 The 305 code is deprecated AFAIS: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages This would only leave the 300 code which is rather exotic and would need a vastly different editing UI and response: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/300
  11. Guido Schmechel commented on patch set 3 08/19/21, 08:52

    Reply

    Thank you for the detailed explanation:-)
  12. Riny van Tiggelen voted on patch set 3 V +1 CR +1 09/08/21, 11:03

  13. Rick Septer voted on patch set 3 V +1 CR +1 09/08/21, 11:49

  14. Jorgen van der Kroon voted on patch set 3 V +1 CR +1 09/08/21, 11:50

  15. Xavier Perseguers voted on patch set 3 CR +1 09/08/21, 12:53

  16. Richard Haeser commented on patch set 3 CR +1 09/08/21, 14:58

    I added some tests in https://review.typo3.org/c/Packages/TYPO3.CMS/+/70971. As these tests are not directly related to this change, I created a separate patch. We also might add the 308 status code to those tests.
  17. Mathias Brodala commented on patch set 3 09/08/21, 15:01

    Reply

    Very good idea, thanks.
  18. Jeroen Schutte voted on patch set 3 V +1 CR +1 09/08/21, 17:59

  19. Georg Ringer voted on patch set 3 V +2 CR +2 09/09/21, 07:53

  20. Georg Ringer merged patch set 4 09/09/21, 07:53