Skip to content

Commit

Permalink
Fixing ASP.NET Cookie Provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Elad Zelingher committed Dec 30, 2016
1 parent a53261a commit 2f94e13
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,16 @@ private static CookieCollection GetCookieCollection(HttpContext httpContext)
{
CookieCollection result = new CookieCollection();

foreach (HttpCookie cookie in httpContext.Request.Cookies)
HttpCookieCollection cookies = httpContext.Request.Cookies;

for (int i = 0; i < cookies.Count; i++)
{
result.Add(new Cookie(cookie.Name, cookie.Value));
HttpCookie cookie = cookies.Get(i);

if (cookie != null)
{
result.Add(new Cookie(cookie.Name, cookie.Value));
}
}

return result;
Expand Down

0 comments on commit 2f94e13

Please sign in to comment.