Addressed feedback

This commit is contained in:
Alessio Franceschelli 2019-06-21 00:37:03 +01:00
parent be7fa3b9fd
commit 9930ce155b
1 changed files with 1 additions and 2 deletions

View File

@ -164,9 +164,8 @@ namespace Microsoft.AspNetCore.ResponseCaching
if (context.CachedResponseHeaders != null) if (context.CachedResponseHeaders != null)
{ {
for (var i = 0; i < HeadersToIncludeIn304.Length; i++) foreach (var key in HeadersToIncludeIn304)
{ {
var key = HeadersToIncludeIn304[i];
if (context.CachedResponseHeaders.TryGetValue(key, out var values)) if (context.CachedResponseHeaders.TryGetValue(key, out var values))
{ {
context.HttpContext.Response.Headers[key] = values; context.HttpContext.Response.Headers[key] = values;