Accept empty Content-Type header
Issue: SPR-12173
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user