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

fix: bug when empty event headers (#462) #463

Merged
merged 1 commit into from
Oct 13, 2021

Conversation

codpot
Copy link
Contributor

@codpot codpot commented Sep 23, 2021

Due to in several express.js libraries treats req.headers as NonNullable Object,
when event headers is null causing bugs.

When incoming headers from API Gateway is null, it should transform to {}.

Fix #462, #417

Issue #, if available: #462, #417

Description of changes: check event.headers is null

Checklist

  • Tests have been added and are passing
  • Documentation has been updated

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Due to in several express.js libraries treats req.headers as NonNullable Object,
when event headers is null causing bugs.

When incoming headers from API Gateway is null, it should transform to {}.

Fix CodeGenieApp#462
@brett-vendia brett-vendia merged commit 2b66164 into CodeGenieApp:mainline Oct 13, 2021
github-actions bot pushed a commit that referenced this pull request Oct 13, 2021
## [4.5.1](v4.5.0...v4.5.1) (2021-10-13)

### Bug Fixes

* bug when empty event headers ([#462](#462)) ([#463](#463)) ([2b66164](2b66164))
@github-actions
Copy link

🎉 This PR is included in version 4.5.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

OneDev0411 added a commit to OneDev0411/serverless-express that referenced this pull request Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Causing several bugs when empty headers
2 participants