Skip to content

Commit 37bc932

Browse files
authored
Merge pull request filipw#192 from filipw/bugfix/pr-122
Reapplied filipw#122
2 parents c258a6f + 44c391d commit 37bc932

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/WebApi.OutputCache.V2/CacheOutputAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ protected virtual MediaTypeHeaderValue GetExpectedMediaType(HttpConfiguration co
146146
if (actionContext.Request.Headers.Accept != null)
147147
{
148148
responseMediaType = actionContext.Request.Headers.Accept.FirstOrDefault();
149-
if (responseMediaType == null || !config.Formatters.Any(x => x.SupportedMediaTypes.Contains(responseMediaType)))
149+
if (responseMediaType == null || !config.Formatters.Any(x => x.SupportedMediaTypes.Any(value => value.MediaType == responseMediaType.MediaType)))
150150
{
151151
return DefaultMediaType;
152152
}

0 commit comments

Comments
 (0)