Improve invalid Content-Type handling in WebFlux
Closes gh-29565
This commit is contained in:
@@ -990,7 +990,8 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
/**
|
||||
* Return the {@linkplain MediaType media type} of the body, as specified
|
||||
* by the {@code Content-Type} header.
|
||||
* <p>Returns {@code null} when the content-type is unknown.
|
||||
* <p>Returns {@code null} when the {@code Content-Type} header is not set.
|
||||
* @throws InvalidMediaTypeException if the media type value cannot be parsed
|
||||
*/
|
||||
@Nullable
|
||||
public MediaType getContentType() {
|
||||
|
||||
Reference in New Issue
Block a user