-
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
AwsLambdaServletContainerHandler(line:100)- Could not forward request #269
Comments
Failed to complete request: org.springframework.http.InvalidMediaTypeException: Invalid mime type "; charset=utf-8": 'mimeType' must not be empty |
Thanks for reporting this @1103036128. Do you have an example of the incoming request (event dump)? Also, make sure you are using the latest version of the framework: |
I found this problem: the aws lambda serverless container does not need to set the filter - response.SetCharacterEncoding (" utf-8 "), you can close this problem, thank you |
But I want to set the character encoding to utf-8, |
The error is: |
My dependency is : |
The 1.3.2 version is the same error: |
My example:
|
ERROR com.amazonaws.serverless.proxy.internal.servlet.AwsLambdaServletContainerHandler(line:100)- Could not forward request |
@sapessi I hope you can help me with this problem. Thank you very much |
My springboot version is 2.1.4 |
Thanks @1103036128 - I'll work to replicate today. This is the character encoding of the response correct? |
If I don't set the springboot configuration of utf-8, it will respond normally, but Chinese characters will be scrambled.So I want to set it to utf-8, but it will cause abnormal response |
Hi @1103036128, I figured out what is going on. Seems to be a bug but I'm not 100% sure what the appropriate behavior should be. There are two things going on here.
LambdaContainerHandler.getContainerConfig().setDefaultContentCharset("UTF-8");
|
I'm committing a fix to this that conforms to the behavior described in the servlet specs. Once you see the commit appear in this issue you can test yourself by cloning the |
…ing in the response overwrites whatever is passed in with the content type header
mvn install:install-file -Dfile=aws-serverless-java-container-core-1.4-SNAPSHOT.jar -DgroupId=com.amazonaws.serverless -DartifactId=aws-serverless-java-container-core -Dversion=1.4-SNAPSHOT -Dpackaging=jar |
Is my above operation correct? |
When will you release it to Maven Repository? |
You could simply: # clone the repo to your local machine
$ git clone https://github.com/awslabs/aws-serverless-java-container.git
$ cd aws-serverless-java-container
# switch to the core branch
$ git checkout core
# install the latest version in local
$ mvn install Once it's installed, you can just change the dependency version in your project's |
Thank you ! |
Spring Boot ErrorController
The text was updated successfully, but these errors were encountered: