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

Copy Content-Type from Netty HttpResponse to APIGatewayV2HTTPResponse #16007

Merged
merged 1 commit into from Mar 29, 2021

Conversation

richiethom
Copy link
Contributor

Fixes #15909

If the Netty response is an HttpResponse, retrieve its Content-Type and set it on the APIGatewayV2HTTPResponse.

(my first pull request for a long time, a lot has changed, please don't hesitate to fix/squash if necessary)

@gsmet gsmet dismissed their stale review March 26, 2021 17:58

Comment addressed.

@richiethom richiethom marked this pull request as draft March 26, 2021 19:10
@richiethom richiethom marked this pull request as ready for review March 26, 2021 20:57
@richiethom
Copy link
Contributor Author

@gsmet finally worked out how to do squash the PR, hopefully it's all ok now

@richiethom
Copy link
Contributor Author

I've changed it all, the MultiValueHeaders stuff is now replaced with 'normal' headers. If the Header returned from Netty is multi-valued, it is concatenated with commas, as explained in the AWS API Gateway 2 documentation:

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.

Let me know what you think.

@richiethom richiethom marked this pull request as ready for review March 27, 2021 12:55
@richiethom richiethom marked this pull request as draft March 27, 2021 16:25
@richiethom richiethom marked this pull request as ready for review March 27, 2021 22:49
@richiethom
Copy link
Contributor Author

hi @patriot1burke and @gsmet this is now ready for a review.

@patriot1burke patriot1burke merged commit 674b4cf into quarkusio:main Mar 29, 2021
@quarkus-bot quarkus-bot bot added this to the 1.14 - main milestone Mar 29, 2021
@patriot1burke
Copy link
Contributor

@richiethom Great job on this. Thank you.

@richiethom richiethom deleted the quarkus_15909 branch March 29, 2021 20:41
@gsmet gsmet modified the milestones: 2.0 - main, 1.13.2.Final Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS Lambda HTTP Content-Type is lost
3 participants