Repository navigation
Preserve preferred extensions when rebuilding MIME data - #66
Closed
OskarEichler wants to merge 1 commit into
Closed
OskarEichler wants to merge 1 commit into
OskarEichler wants to merge 1 commit into
Conversation
Member
|
fix is good but it needs a test ... cleaning up CI now |
Merged
SamSaffron
added a commit
that referenced
this pull request
Sep 2, 2026
Require Ruby 3.3 and refresh the bundled MIME database from mime-types-data 3.2026.0701. Use byte offsets for Unicode-safe database lookups, avoid duplicate lowercase misses, and preserve extension priorities when rebuilding the database. Update CI to cover current Ruby implementations and runners. closes #64, #65, #66
Member
|
sorry addressed in my big pr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Keep each selected MIME type’s own preferred extension when building
content_type_mime.db, rather than resolving the row’s current extension back through the global filename index.The filename lookup can select a different MIME type that shares the extension. With current
mime-types-datait cross-selects 49 extension rows, produces 11 wrong preferred-extension records, and returns no type at all for.htaccess, causingrake rebuild_dbto abort. This also follows the parity intent discussed in #44.Verification
rake rebuild_dbcompletes againstmime-types3.7.0 /mime-types-data3.2026.0701.ruby -c Rakefile, targeted RuboCop, and source diff checks pass.No generated database update or test change is included.