Skip to content

fix: ensure response header value is string type#474

Merged
brettstack merged 1 commit intoCodeGenieApp:mainlinefrom
etamity:fix-response-value-type
Oct 14, 2021
Merged

fix: ensure response header value is string type#474
brettstack merged 1 commit intoCodeGenieApp:mainlinefrom
etamity:fix-response-value-type

Conversation

@etamity
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown

🎉 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