Support "Accept-Patch" for unsupported media type
This commit introduces support in both servlet and webflux for the "Accept-Patch" header, which is sent when the client sends unsupported data in PATCH requests. See section 2.2 of RFC 5789. Closes gh-26759
This commit is contained in:
@@ -190,7 +190,7 @@ public abstract class RequestMappingInfoHandlerMapping extends AbstractHandlerMe
|
||||
catch (InvalidMediaTypeException ex) {
|
||||
throw new UnsupportedMediaTypeStatusException(ex.getMessage());
|
||||
}
|
||||
throw new UnsupportedMediaTypeStatusException(contentType, new ArrayList<>(mediaTypes));
|
||||
throw new UnsupportedMediaTypeStatusException(contentType, new ArrayList<>(mediaTypes), exchange.getRequest().getMethod());
|
||||
}
|
||||
|
||||
if (helper.hasProducesMismatch()) {
|
||||
|
||||
Reference in New Issue
Block a user