Accept empty Content-Type header

Issue: SPR-12173
This commit is contained in:
Juergen Hoeller 2014-09-12 16:44:56 +02:00
parent 8922da3af6
commit 70412a9d0a
1 changed files with 1 additions and 1 deletions

View File

@ -556,7 +556,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
*/
public MediaType getContentType() {
String value = getFirst(CONTENT_TYPE);
return (value != null ? MediaType.parseMediaType(value) : null);
return (StringUtils.hasLength(value) ? MediaType.parseMediaType(value) : null);
}
/**