We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7ea8632 + 0b5f8c3 commit c258a6fCopy full SHA for c258a6f
src/WebApi.OutputCache.V2/CacheOutputAttribute.cs
@@ -194,7 +194,7 @@ public override void OnActionExecuting(HttpActionContext actionContext)
194
var val = _webApiCache.Get<byte[]>(cachekey);
195
if (val == null) return;
196
197
- var contenttype = _webApiCache.Get<MediaTypeHeaderValue>(cachekey + Constants.ContentTypeKey) ?? new MediaTypeHeaderValue(cachekey.Split(new[] { ':' }, 2)[1].Split(';')[0]);
+ var contenttype = _webApiCache.Get<MediaTypeHeaderValue>(cachekey + Constants.ContentTypeKey) ?? responseMediaType;
198
199
actionContext.Response = actionContext.Request.CreateResponse();
200
actionContext.Response.Content = new ByteArrayContent(val);
0 commit comments