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: ensure response header value is string type #474

Merged
merged 1 commit into from
Oct 14, 2021

Conversation

etamity
Copy link
Contributor

@etamity etamity commented Oct 14, 2021

multiValueHeaders and headers maps while processing the integration response
into a single Map<String, List> value
https://kevinhakanson.com/2019-10-25-aws-alb-lambda-function-targets-and-multi-value-headers
https://javadoc.io/static/com.amazonaws/aws-lambda-java-events/2.2.7/com/amazonaws[…]services/lambda/runtime/events/APIGatewayProxyRequestEvent.html
getMultiValueHeaders() return as Map<String,List>

currently there are some header value are not string type (e.g content-length), which will cause 502 error on awselb/api gateway layer.

so we need to transform all headers value as string

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.

@brettstack
Copy link
Collaborator

LGTM could you please remove the package-lock.json from the commit first

@etamity etamity force-pushed the fix-response-value-type branch from 7998aaa to 1c84ce5 Compare October 14, 2021 10:41
@brettstack brettstack merged commit cb4b0e8 into CodeGenieApp:mainline Oct 14, 2021
@brettstack
Copy link
Collaborator

Thanks @etamity !

github-actions bot pushed a commit that referenced this pull request Oct 14, 2021
## [4.5.2](v4.5.1...v4.5.2) (2021-10-14)

### Bug Fixes

* ensure response header value is string type ([#474](#474)) ([cb4b0e8](cb4b0e8))
@github-actions
Copy link

🎉 This PR is included in version 4.5.2 🎉

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
## [4.5.2](CodeGenieApp/serverless-express@v4.5.1...v4.5.2) (2021-10-14)

### Bug Fixes

* ensure response header value is string type ([#474](CodeGenieApp/serverless-express#474)) ([cb4b0e8](CodeGenieApp/serverless-express@cb4b0e8))
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.

2 participants