From 9aaaefbb1bd096b7ab061a77c659bb697fe4e25c Mon Sep 17 00:00:00 2001 From: lundog Date: Fri, 22 Dec 2017 12:55:06 -0700 Subject: [PATCH] Initialize RequestCookieCollection case insensitive (#981) * Initialize RequestCookieCollection case insensitive * Call RequestCookieCollection constructor directly --- .../Internal/RequestCookieCollection.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.AspNetCore.Http/Internal/RequestCookieCollection.cs b/src/Microsoft.AspNetCore.Http/Internal/RequestCookieCollection.cs index ca85fd1d04..4af0a65246 100644 --- a/src/Microsoft.AspNetCore.Http/Internal/RequestCookieCollection.cs +++ b/src/Microsoft.AspNetCore.Http/Internal/RequestCookieCollection.cs @@ -71,7 +71,8 @@ namespace Microsoft.AspNetCore.Http.Internal return Empty; } - var store = new Dictionary(cookies.Count); + var collection = new RequestCookieCollection(cookies.Count); + var store = collection.Store; for (var i = 0; i < cookies.Count; i++) { var cookie = cookies[i]; @@ -80,7 +81,7 @@ namespace Microsoft.AspNetCore.Http.Internal store[name] = value; } - return new RequestCookieCollection(store); + return collection; } return Empty; }