-
Notifications
You must be signed in to change notification settings - Fork 560
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
AwsProxyHttpServletResponseWriter #339
Comments
Hi @argenstijn - it is not possible today. However, we can add this as a fix for the next release. What is the issue you are running into? What's the output from the ALB? |
you will receive a 502 Bad Gateway. |
by the ALB |
I have tested this and for some reason I cannot seem to return binary content from an ALB no matter what I do - even without using the MIME encoder. This works fine with API Gateway. I will check-in with the ALB team to dive deeper on the issue |
Hi, i have a working version. Will add it IT tomorrow.
Cheers mark
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Stefano Buliani <notifications@github.com>
Sent: Wednesday, July 15, 2020 10:05:48 PM
To: awslabs/aws-serverless-java-container <aws-serverless-java-container@noreply.github.com>
Cc: argenstijn <argenstijn@hotmail.com>; Mention <mention@noreply.github.com>
Subject: Re: [awslabs/aws-serverless-java-container] AwsProxyHttpServletResponseWriter (#339)
I have tested this and for some reason I cannot seem to return binary content from an ALB no matter what I do - even without using the MIME encoder. This works fine with API Gateway. I will check-in with the ALB team to dive deeper on the issue
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#339 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAA75LG4JXNLMIOOIXPYAU3R3YDZZANCNFSM4MNF77XA>.
|
See config below:
Then you should use this class and make sure that you also add the binary you try to send:
In this example you should be able to download a PDF |
* fix: Use single value headers for HTTP API response (#377) Parametrized the use of the single value headers for the response writer to support the v2 proxy schema for HTTP API * fix: Updated HTTP API handler constructor (#377) Changed default httpApiV2 constructor for the handler in all the framework implementations * fix: Switched to non-mime encoder for respponse (#339)
1.5.2 has now hit maven central. Closing this issue. |
Hi, I am still facing this issue using 1.5.2 . My scenario : I am simply trying to download a zip which has an xml file. My controller @GetMapping("/downloadZip")
This downloads the zip fine on local. On aws , it downloads the zip , but cant extract it . Its corrupted. Windows says invalid. I can see that its going to the else block and using Base 64 encoder. |
Scenario
Lambda in combination with ALB should not use base 64 RFC2045 for encoding binary content
Expected behavior
responseString = Base64.getEncoder().encodeToString(containerResponse.getAwsResponseBodyBytes());
awsProxyResponse.setBase64Encoded(true);
Actual behavior
Base64.getMimeEncoder().encodeToString(containerResponse.getAwsResponseBodyBytes());
awsProxyResponse.setBase64Encoded(true);
It;s possible to configure the base 64 encoder to use for creating the response?
The text was updated successfully, but these errors were encountered: