We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2675f7 commit 44c52a9Copy full SHA for 44c52a9
spring-web/src/main/java/org/springframework/http/HttpHeaders.java
@@ -301,7 +301,7 @@ public void setContentType(MediaType mediaType) {
301
*/
302
public MediaType getContentType() {
303
String value = getFirst(CONTENT_TYPE);
304
- return (value != null ? MediaType.parseMediaType(value) : null);
+ return (StringUtils.hasLength(value) ? MediaType.parseMediaType(value) : null);
305
}
306
307
/**
0 commit comments