-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GetAllHeaders method to golang HTTP filter #33821
Add GetAllHeaders method to golang HTTP filter #33821
Conversation
Hi @willemveerman, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
14154cb
to
90660b5
Compare
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, we need some tests though the implementation is simple.
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
@doujiang24 i think this may be waiting for further review |
I still need to add the tests |
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
@doujiang24 I've added what I think is a test, but I'm not sure how to run the tests - can you shed some light? |
@willemveerman Here is a doc section: Testing Envoy with Bazel For the current ci failure:
As the error message shows it missing dependency. |
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
Actually, I'm just going to improve the tests a little |
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
OK I've added one further test to cover the case of the headerMap being changed, in order to verify that the slices are being copied. Sorry for delay, I had a hard time building the tests on my m2 arm, but found a workaround. @doujiang24 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a small style issue, otherwise, lgtm, thanks~
Signed-off-by: Willem Veerman <6502426+willemveerman@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks
Commit Message: Add GetAllHeaders method to golang HTTP filter
Additional Description: Adds a new method which returns a copy of the underlying
map[string][]string
object which contains all the request headers.Risk Level: Low
Testing: Unit test
Docs Changes: none required - doesn't change the configuration params of the plugin
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]