-
Notifications
You must be signed in to change notification settings - Fork 38.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore quality factor when filtering out "*/*"
Prior to this commit, the `RequestedContentTypeResolverBuilder` would create a `RequestedContentTypeResolver` that internally delegates to a list of resolvers. Each resolver would either return the list of requested media types, or a singleton list with the "*/*" media type; in this case this signals that the resolver cannot find a specific media type requested and that we should continue with the next resolver in the list. Media Types returned by resolvers can contain parameters, such as the quality factor. If the HTTP client requests "*/*;q=0.8", the `HeaderContentTypeResolver` will return this as a singleton list. While this has been resolved from the request, such a media type should not be selected over other media types that could be returned by other resolvers. This commit changes the `RequestedContentTypeResolverBuilder` so that it does not select "*/*;q=0.8" as the requested media type, but instead continues delegating to other resolvers in the list. This means we need to remove the quality factor before comparing it to the "*/*" for equality check. Fixes gh-29915
- Loading branch information
Showing
2 changed files
with
25 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters