Skip to content

Commit 6077053

Browse files
committed
MediaType.sortBySpecificityAndQuality->sortBySpecificity
Closes gh-17059
1 parent 66319fc commit 6077053

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

web/src/main/java/org/springframework/security/web/server/util/matcher/MediaTypeServerWebExchangeMatcher.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.springframework.http.InvalidMediaTypeException;
3131
import org.springframework.http.MediaType;
3232
import org.springframework.util.Assert;
33+
import org.springframework.util.MimeTypeUtils;
3334
import org.springframework.web.accept.ContentNegotiationStrategy;
3435
import org.springframework.web.server.NotAcceptableStatusException;
3536
import org.springframework.web.server.ServerWebExchange;
@@ -138,7 +139,7 @@ public void setIgnoredMediaTypes(Set<MediaType> ignoredMediaTypes) {
138139
private List<MediaType> resolveMediaTypes(ServerWebExchange exchange) throws NotAcceptableStatusException {
139140
try {
140141
List<MediaType> mediaTypes = exchange.getRequest().getHeaders().getAccept();
141-
MediaType.sortBySpecificityAndQuality(mediaTypes);
142+
MimeTypeUtils.sortBySpecificity(mediaTypes);
142143
return mediaTypes;
143144
}
144145
catch (InvalidMediaTypeException ex) {

0 commit comments

Comments
 (0)