We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c743b8 commit fb9c67fCopy full SHA for fb9c67f
1 file changed
src/GraphQL.AspNetCore3/GraphQLHttpMiddleware.cs
@@ -696,7 +696,7 @@ protected virtual MediaTypeHeaderValueMs SelectResponseContentType(HttpContext c
696
return response;
697
} else if (acceptHeaders.Count > 0) {
698
// enumerate through each content type and see if it matches a supported content type
699
- // give priority to specific types, then to types with wildcards
+ // give priority to quality, then specific types, then to types with wildcards
700
var sortedAcceptHeaders = acceptHeaders
701
.OrderByDescending(x => x.Quality ?? 1.0)
702
.ThenBy(x => x.MatchesAllTypes ? 4 : x.MatchesAllSubTypes ? 3 : x.MatchesAllSubTypesWithoutSuffix ? 2 : 1);
0 commit comments