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.
1 parent 1129abc commit 0b5f8c3Copy full SHA for 0b5f8c3
src/WebApi.OutputCache.V2/CacheOutputAttribute.cs
@@ -176,7 +176,7 @@ public override void OnActionExecuting(HttpActionContext actionContext)
176
var val = _webApiCache.Get<byte[]>(cachekey);
177
if (val == null) return;
178
179
- 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;
180
181
actionContext.Response = actionContext.Request.CreateResponse();
182
actionContext.Response.Content = new ByteArrayContent(val);
0 commit comments