Skip to content
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

Merged
merged 3 commits into from
May 31, 2021

Conversation

TheManWhoStaresAtCode
Copy link
Contributor

Summary

Fix bug #937 that lower case headers results in errors

Requirements (place an x in each [ ])

@gitwave gitwave bot added the untriaged label May 28, 2021
@seratch seratch added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch and removed untriaged labels May 28, 2021
@seratch seratch added this to the 3.4.0 milestone May 28, 2021
Copy link
Member

@seratch seratch left a 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
Copy link

codecov bot commented May 28, 2021

Codecov Report

Merging #938 (edd4ec6) into main (f7a8fb0) will decrease coverage by 0.02%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
src/receivers/AwsLambdaReceiver.ts 59.25% <80.00%> (-0.24%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f7a8fb0...edd4ec6. Read the comment docs.


// 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());
Copy link
Contributor

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? 😄

Copy link
Contributor Author

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

TheManWhoStaresAtCode and others added 2 commits May 29, 2021 18:33
Co-authored-by: Kazuhiro Sera <seratch@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented semver:patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants