[file_server] Make suffix type mappings case-insensitive#43668
Merged
ravenblackx merged 4 commits intoenvoyproxy:mainfrom Mar 5, 2026
Merged
[file_server] Make suffix type mappings case-insensitive#43668ravenblackx merged 4 commits intoenvoyproxy:mainfrom
ravenblackx merged 4 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Raven Black <ravenblack@dropbox.com>
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
Signed-off-by: Raven Black <ravenblack@dropbox.com>
wbpcode
approved these changes
Mar 5, 2026
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.
Commit Message: [file_server] Make suffix type mappings case-insensitive
Additional Description: Very small change to file_server, after realizing that we have an environment that serves both PNG and png files. It doesn't make much sense to have to define every combination of case for suffixes (maybe there's some Png or pnG), so making it case-insensitive makes sense.
One way to do that would be to accept any case and convert at init time - but that would provoke a confusing behavior if someone configured
{"png": "image/png", "PNG": "application/octet-stream"}. We could do a deduplication validation after the fact to prevent that, but that adds a bunch of extra code for something that's trivially simple if we just enforce that it be configured in lowercase only at the proto validation level (which should be fine as a change since the filter is one day old and marked WIP).A bonus effect of doing it this way is that protovalidate is also validating "no periods" which I previously validated in code, so that code and its test can be removed.
Risk Level: Negligible, minor change to brand new filter.
Testing: Some removed. Manually validated that the protovalidate rule is functioning as expected.
Docs Changes: n/a
Release Notes: Added previously-forgotten changelog.
Platform Specific Features: n/a