Initialize RequestCookieCollection case insensitive (#981)

* Initialize RequestCookieCollection case insensitive

* Call RequestCookieCollection constructor directly
This commit is contained in:
lundog 2017-12-22 12:55:06 -07:00 committed by Chris Ross
parent db3c3ba589
commit 9aaaefbb1b
1 changed files with 3 additions and 2 deletions

View File

@ -71,7 +71,8 @@ namespace Microsoft.AspNetCore.Http.Internal
return Empty;
}
var store = new Dictionary<string, string>(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;
}