Accept empty Content-Type header
Issue: SPR-12173
(cherry picked from commit 70412a9)
This commit is contained in:
@@ -331,7 +331,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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user