3 implementations of SetCookie
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Http\HttpHeaders.Generated.cs (3)
2379StringValues IHeaderDictionary.SetCookie 9687StringValues IHeaderDictionary.SetCookie 16770StringValues IHeaderDictionary.SetCookie
21 writes to SetCookie
InMemory.FunctionalTests (1)
Http2\Http2ConnectionTests.cs (1)
2370c.Response.Headers.SetCookie = "SetCookie!";
Microsoft.AspNetCore.Authentication.Cookies (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
291responseHeaders.SetCookie = new StringValues(newValues.ToArray());
Microsoft.AspNetCore.CookiePolicy.Test (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
291responseHeaders.SetCookie = new StringValues(newValues.ToArray());
Microsoft.AspNetCore.Http (4)
Internal\ResponseCookies.cs (4)
40Headers.SetCookie = StringValues.Concat(Headers.SetCookie, cookieValue); 64Headers.SetCookie = StringValues.Concat(Headers.SetCookie, cookie); 102Headers.SetCookie = StringValues.Concat(Headers.SetCookie, cookies); 160Headers.SetCookie = new StringValues(newValues.ToArray());
Microsoft.AspNetCore.Http.Extensions.Tests (1)
HeaderDictionaryTypeExtensionsTest.cs (1)
241context.Request.Headers.SetCookie = "cookie1=a,cookie2=b";
Microsoft.AspNetCore.Mvc.Core (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
291responseHeaders.SetCookie = new StringValues(newValues.ToArray());
Microsoft.AspNetCore.OutputCaching.Tests (2)
OutputCachePolicyProviderTests.cs (1)
199context.HttpContext.Response.Headers.SetCookie = "cookieName=cookieValue";
OutputCacheTests.cs (1)
606var builders = TestUtils.CreateBuildersWithOutputCaching(contextAction: context => context.Response.Headers.SetCookie = "cookieName=cookieValue");
Microsoft.AspNetCore.ResponseCaching.Tests (1)
ResponseCachingTests.cs (1)
545var builders = TestUtils.CreateBuildersWithResponseCaching(contextAction: context => context.Response.Headers.SetCookie = "cookieName=cookieValue");
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Http2\Http2HPackEncoderTests.cs (2)
156headers.SetCookie = "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"; 300headers.SetCookie = "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1";
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (7)
HeaderCollectionBenchmark.cs (1)
160headers.SetCookie = "prov=20629ccd-8b0f-e8ef-2935-cd26609fc0bc; __qca=P0-1591065732-1479167353442; _ga=GA1.2.1298898376.1479167354; _gat=1; sgt=id=9519gfde_3347_4762_8762_df51458c8ec2; acct=t=why-is-%e0%a5%a7%e0%a5%a8%e0%a5%a9-numeric&s=why-is-%e0%a5%a7%e0%a5%a8%e0%a5%a9-numeric";
Http2\Http2HeadersEnumeratorBenchmark.cs (2)
29_knownSingleValueResponseHeaders.SetCookie = "Value"; 36_knownMultipleValueResponseHeaders.SetCookie = new StringValues(new[] { "One", "Two" });
ResponseHeaderCollectionBenchmark.cs (1)
128headers.SetCookie = "prov=20629ccd-8b0f-e8ef-2935-cd26609fc0bc; __qca=P0-1591065732-1479167353442; _ga=GA1.2.1298898376.1479167354; _gat=1; sgt=id=9519gfde_3347_4762_8762_df51458c8ec2; acct=t=why-is-%e0%a5%a7%e0%a5%a8%e0%a5%a9-numeric&s=why-is-%e0%a5%a7%e0%a5%a8%e0%a5%a9-numeric";
ResponseHeadersWritingBenchmark.cs (3)
125responseHeaders.SetCookie = "prov=20629ccd-8b0f-e8ef-2935-cd26609fc0bc; __qca=P0-1591065732-1479167353442; _ga=GA1.2.1298898376.1479167354; _gat=1; sgt=id=9519gfde_3347_4762_8762_df51458c8ec2; acct=t=why-is-%e0%a5%a7%e0%a5%a8%e0%a5%a9-numeric&s=why-is-%e0%a5%a7%e0%a5%a8%e0%a5%a9-numeric"; 151responseHeaders.SetCookie = "prov=20629ccd-8b0f-e8ef-2935-cd26609fc0bc; __qca=P0-1591065732-1479167353442; _ga=GA1.2.1298898376.1479167354; _gat=1; sgt=id=9519gfde_3347_4762_8762_df51458c8ec2; acct=t=why-is-%e0%a5%a7%e0%a5%a8%e0%a5%a9-numeric&s=why-is-%e0%a5%a7%e0%a5%a8%e0%a5%a9-numeric"; 166responseHeaders.SetCookie = "prov=20629ccd-8b0f-e8ef-2935-cd26609fc0bc; __qca=P0-1591065732-1479167353442; _ga=GA1.2.1298898376.1479167354; _gat=1; sgt=id=9519gfde_3347_4762_8762_df51458c8ec2; acct=t=why-is-%e0%a5%a7%e0%a5%a8%e0%a5%a9-numeric&s=why-is-%e0%a5%a7%e0%a5%a8%e0%a5%a9-numeric";
47 references to SetCookie
CookiePolicySample (1)
Startup.cs (1)
112var responseCookies = response.Headers.SetCookie;
Microsoft.AspNetCore.Authentication.Cookies (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
275var existingValues = responseHeaders.SetCookie;
Microsoft.AspNetCore.Authentication.OAuth (1)
OAuthHandler.cs (1)
285var cookie = Context.Response.Headers.SetCookie;
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
OpenIdConnectHandler.cs (1)
371var cookie = Context.Response.Headers.SetCookie;
Microsoft.AspNetCore.CookiePolicy.Test (22)
CookieConsentTests.cs (21)
30Assert.Equal("Test=Value; path=/", httpContext.Response.Headers.SetCookie); 49Assert.Equal(0, httpContext.Response.Headers.SetCookie.Count); 68Assert.Equal(0, httpContext.Response.Headers.SetCookie.Count); 94Assert.Equal("Test=Value; path=/", httpContext.Response.Headers.SetCookie); 113Assert.Equal("Test=Value; path=/", httpContext.Response.Headers.SetCookie); 143Assert.Equal(0, httpContext.Response.Headers.SetCookie.Count); 166Assert.Equal("Test=Value; path=/", httpContext.Response.Headers.SetCookie); 189Assert.Equal(0, httpContext.Response.Headers.SetCookie.Count); 217var cookies = SetCookieHeaderValue.ParseList(httpContext.Response.Headers.SetCookie); 267var cookies = SetCookieHeaderValue.ParseList(httpContext.Response.Headers.SetCookie); 305Assert.Equal("Test=Value; path=/", httpContext.Response.Headers.SetCookie); 338Assert.Equal(0, httpContext.Response.Headers.SetCookie.Count); 366Assert.Equal(0, httpContext.Response.Headers.SetCookie.Count); 398var cookies = SetCookieHeaderValue.ParseList(httpContext.Response.Headers.SetCookie); 445var cookies = SetCookieHeaderValue.ParseList(httpContext.Response.Headers.SetCookie); 489Assert.Equal("Test=Value1; path=/", httpContext.Response.Headers.SetCookie); 510var cookies = SetCookieHeaderValue.ParseList(httpContext.Response.Headers.SetCookie); 544Assert.Equal(0, httpContext.Response.Headers.SetCookie.Count); 574var cookies = SetCookieHeaderValue.ParseList(httpContext.Response.Headers.SetCookie); 627var cookies = SetCookieHeaderValue.ParseList(httpContext.Response.Headers.SetCookie); 672var cookies = SetCookieHeaderValue.ParseList(httpContext.Response.Headers.SetCookie);
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
275var existingValues = responseHeaders.SetCookie;
Microsoft.AspNetCore.Http (4)
Internal\ResponseCookies.cs (4)
40Headers.SetCookie = StringValues.Concat(Headers.SetCookie, cookieValue); 64Headers.SetCookie = StringValues.Concat(Headers.SetCookie, cookie); 102Headers.SetCookie = StringValues.Concat(Headers.SetCookie, cookies); 145var existingValues = Headers.SetCookie;
Microsoft.AspNetCore.Http.Extensions (1)
ResponseHeaders.cs (1)
192return Headers.SetCookie.GetList<SetCookieHeaderValue>();
Microsoft.AspNetCore.Http.Tests (10)
ResponseCookiesTest.cs (10)
46var cookieHeaderValues = headers.SetCookie; 70var cookieHeaderValues = headers.SetCookie; 91var cookieHeaderValues = headers.SetCookie; 110var cookieHeaderValues = headers.SetCookie; 137var deletedCookies = headers.SetCookie.ToArray(); 168var deletedCookies = headers.SetCookie.ToArray(); 196var cookieHeaderValues = headers.SetCookie; 218var cookieHeaderValues = headers.SetCookie; 238var cookieHeaderValues = headers.SetCookie; 256var cookieHeaderValues = headers.SetCookie;
Microsoft.AspNetCore.Mvc.Core (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
275var existingValues = responseHeaders.SetCookie;
Microsoft.AspNetCore.ResponseCaching (1)
ResponseCachingPolicyProvider.cs (1)
94if (!StringValues.IsNullOrEmpty(response.Headers.SetCookie))
Microsoft.AspNetCore.Rewrite.Tests (3)
UrlActions\ChangeCookieActionTests.cs (3)
29var cookieHeaders = context.HttpContext.Response.Headers.SetCookie; 45var cookieHeaders = context.HttpContext.Response.Headers.SetCookie; 58var cookieHeaders = context.HttpContext.Response.Headers.SetCookie;
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
HeaderCollectionBenchmark.cs (1)
279value = headers.SetCookie;