Review main Merged

55627[TASK] FE: Move Content-Length header to middleware

Benni Mack CR +2 V +2 Normal +66 −14 updated 02/12/18, 08:03

Commit message

Review

  • Code review CR +2
    • Susi Moog +2
    • Benjamin Franzke +1
    • Mathias Schreiber +1
    • Georg Ringer +1
  • Verified V +2
    • Susi Moog +2
    • Benjamin Franzke +1
    • Mathias Schreiber +1
    • Georg Ringer +1
    • TYPO3com +1 CI

Issues 1

Files 3

Review log 1520

  1. Benni Mack uploaded patch set 1 02/09/18, 13:06

  2. TYPO3com voted on patch set 1 V -1 02/09/18, 13:16 Completed build in 09m 17s on Fri, 9 Feb, 02:16 PM Test Summary: 1135 of 30625 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-19186

  3. Mathias Schreiber updated the commit message in patch set 2 02/09/18, 13:24

  4. TYPO3com voted on patch set 2 V -1 02/09/18, 13:39 Completed build in 14m 05s on Fri, 9 Feb, 02:39 PM Test Summary: 1135 of 30625 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-19192

  5. Benni Mack rebased onto patch set 3 02/09/18, 14:06

  6. TYPO3com voted on patch set 3 V -1 02/09/18, 14:14 Completed build in 07m 52s on Fri, 9 Feb, 03:14 PM Test Summary: 1135 of 30625 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-19195

  7. Susi Moog uploaded patch set 4 02/09/18, 18:20

  8. TYPO3com voted on patch set 4 V +1 02/09/18, 18:28 Completed build in 07m 56s on Fri, 9 Feb, 07:28 PM Test Summary: 30470 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-19207

  9. Mathias Schreiber commented on patch set 4 CR -1 02/09/18, 18:40

    ContentLengthResponseHeader.php:28 Unresolved

    it doesn't seem like we log here. If the logging has been removed on purpose, let me know, I'll adjust the comment. If I fail to find some other kind of logging, let me know :)
  10. Benjamin Franzke commented on patch set 4 CR -1 02/09/18, 20:10

    ContentLengthResponseHeader.php:55 Unresolved

    Really withAddedHeader here? Two Content-Length headers aren't useful. We should use withHeader() here. Also: We should check hasHeader() before calling withHeader(), to prevent adding the Content-Length header if already defined.

    RequestMiddlewares.php:32 Unresolved

    Should be 'after' => [ 'typo3/cms-frontend/eid' ], no? We didn't add the content-length header for eIDs before, that should stay the same. (Although the ordering will probably work as the eid middleware is defined before, we should make that explicit)
  11. Benni Mack uploaded patch set 5 02/10/18, 20:54

  12. TYPO3com voted on patch set 5 V +1 02/10/18, 21:03 Completed build in 09m 24s on Sat, 10 Feb, 10:03 PM Test Summary: 30470 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-19310

  13. Tymoteusz Motylewski commented on patch set 5 02/10/18, 21:42

    RequestHandler.php:276

    is the logger removed on purpose?
  14. Benni Mack commented on patch set 5 02/10/18, 23:37

    RequestHandler.php:276 Reply

    Kinda. don't know if we need to deprecate this, as this is only debug information. We had this in BE and FE since ages, and rewrote this to PSR-3 in v9.0, however, this is not really useful, as the BE does not call that anymore either. We could introduce this properly on the application side. Hopefully, Markus will go into the logging topic again in v9.
  15. Mathias Schreiber voted on patch set 5 V +1 CR +1 02/10/18, 23:38

  16. Georg Ringer voted on patch set 5 V +1 CR +1 02/11/18, 05:50

  17. Benjamin Franzke commented on patch set 5 CR -1 02/11/18, 06:03

    ContentLengthResponseHeader.php:55

    I'm still sure we should check hasHeader before adding a (new) Content-Length header. There is no need to recalculate the size in case that has been done by the code that created the response.
  18. Benjamin Franzke commented on patch set 5 V +1 CR +1 02/12/18, 07:59

    ContentLengthResponseHeader.php:55 Reply Unresolved

    Rereading this is see that this middleware is very tightly coupled to TSFE. (My idea was to add a general ContentLength Middleware to EXT:core that could be used for backend/frontend/install tool/eid..) But that's probably something for another commit. Therefore I agree that it's ok to leave out hasHeader for now.
  19. Susi Moog voted on patch set 5 V +2 CR +2 02/12/18, 08:03

  20. Susi Moog merged patch set 6 02/12/18, 08:03