feat: implement multi header support#443
Merged
theseion merged 5 commits intocoreruleset:mainfrom Jun 9, 2025
Merged
Conversation
Collaborator
Author
|
Note that our test format currently does not support multiple headers with the same name, because we use a map for headers. In the future we should use a list instead in order to allow for repeating headers and values. |
fzipi
requested changes
Jan 12, 2025
Member
fzipi
left a comment
There was a problem hiding this comment.
Thanks for taking this. Big change.
I'll suggest you to split in 3 PRs, as we are mixing stuff here.
- All the zerolog changes (🙏 good catch). E.g. inclusion and initialization.
func (s *responseTestSuite) SetupSuite() {
zerolog.SetGlobalLevel(zerolog.Disabled)
}
- The uncommented
self_updatertests - This PR, rebased after the above.
It will make things more clear if we need to revert something.
411541d to
d98119c
Compare
1a6f1cc to
26d8018
Compare
fzipi
reviewed
Feb 3, 2025
fzipi
previously approved these changes
Feb 14, 2025
05f2e83 to
1c56f65
Compare
aa265ca to
73be30d
Compare
Collaborator
Author
|
Extended PR with updated schema and support for new |
73be30d to
44c74d6
Compare
- support multiple headers with the same name - support multiple headers with identical name and value - make list of headers ordered; in the future, tests should be able to enforce the order of headers in a request - improve API, tests, and documentation of ftwhttp.Header - disable logging in tests where possible - enable self-updater test (go-critic was complaining because the test file was touched) Fixes coreruleset#332
Collaborator
Author
Collaborator
Author
fzipi
approved these changes
Jun 7, 2025
Member
fzipi
left a comment
There was a problem hiding this comment.
LGTM. I see a missed opportunity for pineapple and pizza vs. homer & donuts 😄 😄
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.
support multiple headers with the same name
support multiple headers with identical name and value
make list of headers ordered; in the future, tests should be able to enforce the order of headers in a request
improve API, tests, and documentation of ftwhttp.Header
disable logging in tests where possible
enable self-updater test (go-critic was complaining because the test file was touched)
Fixes #332