-
Notifications
You must be signed in to change notification settings - Fork 399
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
ignore casing of HTTP headers as requested by RFC (#937) #938
Conversation
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 for fixing this! The changes look great to me. We'll merge this PR once we confirm the CI builds pass.
Codecov Report
@@ Coverage Diff @@
## main #938 +/- ##
==========================================
- Coverage 66.22% 66.19% -0.03%
==========================================
Files 13 13
Lines 1205 1207 +2
Branches 355 356 +1
==========================================
+ Hits 798 799 +1
Misses 338 338
- Partials 69 70 +1
Continue to review full report at Codecov.
|
src/receivers/AwsLambdaReceiver.ts
Outdated
|
||
// eslint-disable-next-line class-methods-use-this | ||
private getHeaderValue(headers: Record<string, any>, key: string): string | undefined { | ||
const caseInsensitivKey = Object.keys(headers).find((it) => key.toLowerCase() === it.toLowerCase()); |
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.
Lack of e
here (re: Insensitive
) intentional? 😄
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 for pointing this out to me 🙏 and as it was not intentional I fixed it
Co-authored-by: Kazuhiro Sera <seratch@gmail.com>
Summary
Fix bug #937 that lower case headers results in errors
Requirements (place an
x
in each[ ]
)