mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-22 12:02:14 +00:00
MediaType.sortBySpecificityAndQuality->sortBySpecificity
Closes gh-17059
This commit is contained in:
parent
66319fc3bc
commit
607705347c
@ -30,6 +30,7 @@ import org.springframework.core.log.LogMessage;
|
||||
import org.springframework.http.InvalidMediaTypeException;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.MimeTypeUtils;
|
||||
import org.springframework.web.accept.ContentNegotiationStrategy;
|
||||
import org.springframework.web.server.NotAcceptableStatusException;
|
||||
import org.springframework.web.server.ServerWebExchange;
|
||||
@ -138,7 +139,7 @@ public class MediaTypeServerWebExchangeMatcher implements ServerWebExchangeMatch
|
||||
private List<MediaType> resolveMediaTypes(ServerWebExchange exchange) throws NotAcceptableStatusException {
|
||||
try {
|
||||
List<MediaType> mediaTypes = exchange.getRequest().getHeaders().getAccept();
|
||||
MediaType.sortBySpecificityAndQuality(mediaTypes);
|
||||
MimeTypeUtils.sortBySpecificity(mediaTypes);
|
||||
return mediaTypes;
|
||||
}
|
||||
catch (InvalidMediaTypeException ex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user