feat: header-wise max_header_value_length #1697
Closed
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.
Integer stays as a possible config value so that this stays backward compatible.
IMO there are two possibilities to add this feature:
#{<<"authorization">>=>8192, '_' => 4096}-_atom is inconvenient to specify a default, but can bi placed in a config filefun(<<"authorization">>=>8192; (_) -> 4096 end- match-all is convenient, but can't be placed in a config file (directly!). If one want to change this in runtime (which I think is pretty rare) it must recompile the code or fetch each value as a separate env value.I tried to test this but it's tricky to get it without breaking current test patterns - i.e. without using
init_per_testcase/1which is not used in this codebase.rfc7230_SUITEstarts all groups with the same option and what I'd what is to test for431status code whenmax_header_value_lengthis set differently.Closes #1677