Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix multipart detection logic in FormHttpMessageConverter #7

Closed
wants to merge 1 commit into from

2 participants

@sergej-koscejev

isMultipart(map, contentType) incorrectly returns false for
contentType="multipart/form-data; charset=utf-8", should return true.

Sergej Koščejev Fix multipart detection logic in FormHttpMessageConverter
isMultipart(map, contentType) incorrectly returns false for
contentType="multipart/form-data; charset=utf-8", should return true.
05581bb
@royclarkson
Owner

Hi, I'm ready to merge this change. Have you signed the CLA? I can't merge without that confirmation. If you can add a test too, that would be helpful, but I'm happy merging without that. Thanks!

@sergej-koscejev

I haven't signed anything but it's a one-word change, you should be able to apply it without a CLA.

@royclarkson
Owner

I can apply the change and fix the issue, but I can't merge your PR and give you credit. The CLA let's me do that.

@sergej-koscejev

No problem, I don't care about credit in this case.

@royclarkson
Owner

This fix is now available in the latest 2.0 snapshot. Thanks for reporting!

JIRA Issue: ANDROID-165

@royclarkson royclarkson closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 29, 2013
  1. Fix multipart detection logic in FormHttpMessageConverter

    Sergej Koščejev authored
    isMultipart(map, contentType) incorrectly returns false for
    contentType="multipart/form-data; charset=utf-8", should return true.
This page is out of date. Refresh to see the latest.
View
2  spring-android-rest-template/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java
@@ -212,7 +212,7 @@ public void write(MultiValueMap<String, ?> map, MediaType contentType, HttpOutpu
private boolean isMultipart(MultiValueMap<String, ?> map, MediaType contentType) {
if (contentType != null) {
- return MediaType.MULTIPART_FORM_DATA.equals(contentType);
+ return MediaType.MULTIPART_FORM_DATA.includes(contentType);
}
for (String name : map.keySet()) {
for (Object value : map.get(name)) {
Something went wrong with that request. Please try again.