Skip to content

GH-3711: Fix HTTP handler for content type header #3715

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

Merged
merged 1 commit into from
Feb 3, 2022

Conversation

artembilan
Copy link
Member

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

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 garyrussell merged commit 4799c3b into spring-projects:main Feb 3, 2022
@garyrussell
Copy link
Contributor

...and cherry-picked.

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.

No HttpMessageConverter for java.util.HashMap and content type "application/x-www-form-urlencoded;charset=UTF-8"
2 participants