We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4eba417 + dbb1778 commit b0d3753Copy full SHA for b0d3753
1 file changed
src/WebApi.OutputCache.V2/CacheOutputAttribute.cs
@@ -201,6 +201,7 @@ private async Task OnActionExecuted(HttpActionExecutedContext actionExecutedCont
201
//ConfigureAwait false to avoid deadlocks
202
var content = await actionExecutedContext.Response.Content.ReadAsByteArrayAsync().ConfigureAwait(false);
203
204
+ actionExecutedContext.Response.Content.Headers.Remove("Content-Length");
205
206
_webApiCache.Add(baseKey, string.Empty, cacheTime.AbsoluteExpiration);
207
_webApiCache.Add(cachekey, content, cacheTime.AbsoluteExpiration, baseKey);
0 commit comments