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

parse duplicate query string fields for EventV2 #1438

Closed
wants to merge 2 commits into from

Conversation

woodybriggs
Copy link

@woodybriggs woodybriggs commented May 19, 2022

Description

AWS Gateway Proxy V2 Integrations with lambdas serializes duplicate fields in query string by concatenating the values together. This is not reflected in the current code.

Before this change:

http://example.com/endpoint?filter=1&filter=2
Would be serialized as 

{
    "filter": 2
}

After this change

{
    "filter": "1,2"
}

Motivation and Context

https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html#http-api-develop-integrations-lambda.proxy-format~

extract from aws

Format 2.0 doesn't have multiValueHeaders or multiValueQueryStringParameters fields. Duplicate headers are combined with commas and included in the headers field. Duplicate query strings are combined with commas and included in the queryStringParameters field.

fixes -> #1437

How Has This Been Tested?

no tests modified or created. happy to modify some tests if i can be pointed to the current test for this problem statement.

Screenshots (if appropriate):

@dnalborczyk
Copy link
Collaborator

thank you @woodybriggs could you add some tests?

@dnalborczyk
Copy link
Collaborator

@woodybriggs someone picked up your PR and added some tests to it: #1525

thanks again, closing this for good house keeping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants