Review main Ready for review Quiet

96800[TASK] Generate reverse MIME type mappings

Wouter Wolters CR +1 V +1 Expert +1359 −8 updated 10/24/26, 19:59

Commit message

Generate an extension-to-MIME-type map alongside the existing MIME
map. Use the generated reverse map in MimeTypeDetector to avoid
scanning every MIME type for each file extension lookup.

Preserve case normalization, result ordering and empty results for
unknown extensions. Verify lookup results against the existing map
for every known extension and MIME type.

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 1
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/00/96800/1 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/00/96800/1 && git cherry-pick FETCH_HEAD

Review

  • Code review CR +1 Needs a vote
    • Simon Schaufelberger +1
  • Verified V +1 Needs a vote
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 78

  1. Wouter Wolters uploaded patch set 1 10/17/26, 17:12

  2. core-ci voted on patch set 1 V +1 10/17/26, 17:20 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/111481

  3. Garvin Hicking commented on patch set 1 10/18/26, 18:11

    Also see https://review.typo3.org/c/Packages/TYPO3.CMS/+/96772 maybe we can somehow combine this.
  4. Wouter Wolters commented on patch set 1 10/18/26, 18:24

    Reply

    I don't see how that image patch is related to my change in any way. This is created by me to have quicker detection instead of looping everything.
  5. Garvin Hicking commented on patch set 1 10/18/26, 18:38

    Reply

    Sorry then.
  6. Wouter Wolters commented on patch set 1 10/18/26, 19:12

    Reply

    What did you have in mind? IMO there is not much to combine here as these patches have a completely different purposes.
  7. Garvin Hicking commented on patch set 1 10/18/26, 20:18

    Reply

    Oh it seens the rest of my answer was swallowed! I wrote something along the lines of: I was hoping we could find a way to prevent the extra "mime" lines in that patch, but I has not looked thoroughly into Benjis patch (and yours neither). I was mainly trigfered that I wanted to preserve redundancy in mimes, and thought maye we could for example have another mime file in another repo that could act as the extra mime image metadata carrier. I can follow your reply when you say its not related, der wunsch war vater des gedanken.
  8. Simon Schaufelberger voted on patch set 1 CR +1 V +1 10/24/26, 19:59