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 bea9f3f commit afb0342Copy full SHA for afb0342
spring-web/src/main/java/org/springframework/http/HttpHeaders.java
@@ -331,7 +331,7 @@ public void setContentType(MediaType mediaType) {
331
*/
332
public MediaType getContentType() {
333
String value = getFirst(CONTENT_TYPE);
334
- return (value != null ? MediaType.parseMediaType(value) : null);
+ return (StringUtils.hasLength(value) ? MediaType.parseMediaType(value) : null);
335
}
336
337
/**
0 commit comments