Added extra table for mimtype if os level check finds no match
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do?
This MR adds an extra table of mime-types to search, if the golang table (used in the function mime.TypeByExtension) fails to find a match. If this table also fails to find a match, the code falls through to the existing os level tables.
This table can be used to insert mime-types that are not in the golang table while providing consistent os independent behavior. In particular it is being used to address an inconsistency found in #1103
TODO
-
Feature flag
-
Added feature flag: -
This feature does not require a feature flag
-
-
I added the Changelogtrailer to the commits that need to be included in the changelog (e.g.Changelog: added) -
I added unit tests or they are not required -
I added acceptance tests or they are not required -
I added documentation (or it's not required) -
I followed code review guidelines -
I followed Go Style guidelines
As an easy to understand trivial (~5 lines) of code change, I did not create unit tests, acceptance tests or documentation updates. These can be added if the reviewers wish it.
Edited by Rick Duff