-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
No HttpMessageConverter for java.util.HashMap and content type "application/x-www-form-urlencoded;charset=UTF-8" #3711
Comments
The code:
is wrong. It must use Feel free to contribute the fix: https://github.com/spring-projects/spring-integration/blob/main/CONTRIBUTING.adoc. Thank you! |
artembilan
added a commit
to artembilan/spring-integration
that referenced
this issue
Feb 2, 2022
Fixes spring-projects#3711 The `contentType` header may come with parameter in its media type. * Fix `AbstractHttpRequestExecutingMessageHandler` to use `equalsTypeAndSubtype()` ignoring params * Some other code clean up in the `AbstractHttpRequestExecutingMessageHandler` * Ensure in the `HttpRequestExecutingMessageHandlerTests.simpleStringKeyStringValueFormData()` that provided `contentType` header is handled properly * Fix `HttpProxyScenarioTests.testHttpMultipartProxyScenario()` for mislead multi-part form handling **Cherry-pick to `5.5.x`**
garyrussell
pushed a commit
that referenced
this issue
Feb 3, 2022
Fixes #3711 The `contentType` header may come with parameter in its media type. * Fix `AbstractHttpRequestExecutingMessageHandler` to use `equalsTypeAndSubtype()` ignoring params * Some other code clean up in the `AbstractHttpRequestExecutingMessageHandler` * Ensure in the `HttpRequestExecutingMessageHandlerTests.simpleStringKeyStringValueFormData()` that provided `contentType` header is handled properly * Fix `HttpProxyScenarioTests.testHttpMultipartProxyScenario()` for mislead multi-part form handling **Cherry-pick to `5.5.x`**
garyrussell
pushed a commit
that referenced
this issue
Feb 3, 2022
Fixes #3711 The `contentType` header may come with parameter in its media type. * Fix `AbstractHttpRequestExecutingMessageHandler` to use `equalsTypeAndSubtype()` ignoring params * Some other code clean up in the `AbstractHttpRequestExecutingMessageHandler` * Ensure in the `HttpRequestExecutingMessageHandlerTests.simpleStringKeyStringValueFormData()` that provided `contentType` header is handled properly * Fix `HttpProxyScenarioTests.testHttpMultipartProxyScenario()` for mislead multi-part form handling **Cherry-pick to `5.5.x`**
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In what version(s) of Spring Integration are you seeing this issue?
5.5.x
Describe the bug
No HttpMessageConverter for java.util.HashMap and content type "application/x-www-form-urlencoded;charset=UTF-8"
While "application/x-www-form-urlencoded" works fine.
To Reproduce
context configuration:
`
`
Test:
`
Map<String, String> payload = ImmutableMap.of("data", "abcdef");
`
Result:
No HttpMessageConverter for java.util.HashMap and content type "application/x-www-form-urlencoded;charset=UTF-8"
Expected behavior
hope it works fine same as the header Content-Type=application/x-www-form-urlencoded
Sample
AbstractHttpRequestExecutingMessageHandler.java line 381
The text was updated successfully, but these errors were encountered: