1 write to Headers
Microsoft.Extensions.Http.Resilience.Tests (1)
821 references to Headers
Aspire.Dashboard.Tests (26)
Integration\OtlpCorsHttpServiceTests.cs (12)
64Assert.Equal("http://localhost:8000", responseMessage1.Headers.GetValues("Access-Control-Allow-Origin").Single());
65Assert.Equal("POST", responseMessage1.Headers.GetValues("Access-Control-Allow-Methods").Single());
66Assert.Equal("X-Requested-With", responseMessage1.Headers.GetValues("Access-Control-Allow-Headers").Single());
78Assert.Equal("http://localhost:8001", responseMessage2.Headers.GetValues("Access-Control-Allow-Origin").Single());
79Assert.Equal("POST", responseMessage2.Headers.GetValues("Access-Control-Allow-Methods").Single());
80Assert.Equal("X-Requested-With", responseMessage2.Headers.GetValues("Access-Control-Allow-Headers").Single());
105Assert.False(responseMessage.Headers.Contains("Access-Control-Allow-Origin"));
106Assert.False(responseMessage.Headers.Contains("Access-Control-Allow-Methods"));
107Assert.False(responseMessage.Headers.Contains("Access-Control-Allow-Headers"));
133Assert.Equal("*", responseMessage.Headers.GetValues("Access-Control-Allow-Origin").Single());
134Assert.Equal("POST", responseMessage.Headers.GetValues("Access-Control-Allow-Methods").Single());
135Assert.Equal("x-requested-with,x-custom,Content-Type", responseMessage.Headers.GetValues("Access-Control-Allow-Headers").Single());
AuthSamples.FunctionalTests (5)
dotnet-openapi (1)
dotnet-svcutil-lib (3)
IIS.FunctionalTests (9)
IIS.LongTests (2)
IIS.NewHandler.FunctionalTests (2)
IIS.NewShim.FunctionalTests (2)
IISExpress.FunctionalTests (16)
Interop.FunctionalTests (6)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Authentication.Test (233)
GoogleTests.cs (24)
56var location = transaction.Response.Headers.Location;
152var query = transaction.Response.Headers.Location.Query;
190var query = QueryHelpers.ParseQuery(transaction.Response.Headers.Location.Query);
242var query = QueryHelpers.ParseQuery(transaction.Response.Headers.Location.Query);
298var query = QueryHelpers.ParseQuery(transaction.Response.Headers.Location.Query);
335var query = transaction.Response.Headers.Location.Query;
402Assert.Equal("/error?FailureMessage=AccessDenied", transaction.Response.Headers.GetValues("Location").First());
438Assert.Equal("https://example.com/custom-denied-page?rurl=http%3A%2F%2Fwww.google.com%2F", transaction.Response.Headers.GetValues("Location").First());
481Assert.StartsWith("/error?FailureMessage=", transaction.Response.Headers.GetValues("Location").First());
520Assert.Equal("/error?FailureMessage=itfailed" + UrlEncoder.Default.Encode(";Description=whyitfailed;Uri=https://example.com/fail"), transaction.Response.Headers.GetValues("Location").First());
559Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
630transaction.Response.Headers.GetValues("Location").First());
682transaction.Response.Headers.GetValues("Location").First());
722Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
762Assert.Equal("/", transaction.Response.Headers.GetValues("Location").First());
810Assert.Equal("/foo", transaction.Response.Headers.GetValues("Location").First());
854transaction.Response.Headers.GetValues("Location").First());
883Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
927Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
971Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
1008Assert.Equal("/me", transaction.Response.Headers.GetValues("Location").First());
1016Assert.StartsWith("https://www.facebook.com/", transaction.Response.Headers.Location.OriginalString);
1068var locationUri = transaction.Response.Headers.Location;
1082Assert.Equal("/challenge", transaction.Response.Headers.GetValues("Location").First());
OpenIdConnect\OpenIdConnectChallengeTests.cs (57)
37Assert.NotNull(res.Headers.Location);
40res.Headers.Location,
70Assert.NotNull(res.Headers.Location);
74Assert.Contains("code_challenge=", res.Headers.Location.Query);
75Assert.Contains("code_challenge_method=S256", res.Headers.Location.Query);
79Assert.DoesNotContain("code_challenge=", res.Headers.Location.Query);
80Assert.DoesNotContain("code_challenge_method=", res.Headers.Location.Query);
105Assert.NotNull(res.Headers.Location);
107Assert.DoesNotContain("code_challenge=", res.Headers.Location.Query);
108Assert.DoesNotContain("code_challenge_method=", res.Headers.Location.Query);
126Assert.DoesNotContain(OpenIdConnectParameterNames.SkuTelemetry, res.Headers.Location.Query);
127Assert.DoesNotContain(OpenIdConnectParameterNames.VersionTelemetry, res.Headers.Location.Query);
198Assert.NotNull(res.Headers.Location);
200var values = settings.ValidateChallengeRedirect(res.Headers.Location);
233Assert.NotNull(res.Headers.Location);
235var values = settings.ValidateChallengeRedirect(res.Headers.Location);
276Assert.NotNull(res.Headers.Location);
279res.Headers.Location,
313Assert.NotNull(res.Headers.Location);
316res.Headers.Location,
322var actual = res.Headers.Location.Query.Trim('?').Split('&').Single(seg => seg.StartsWith($"{OpenIdConnectParameterNames.ClientId}=", StringComparison.Ordinal));
357Assert.NotNull(res.Headers.Location);
361Assert.Equal(newMessage.TestAuthorizeEndpoint, res.Headers.Location.AbsoluteUri);
391Assert.Equal("Oolong", res.Headers.GetValues("tea").Single());
392Assert.Null(res.Headers.Location);
421Assert.Null(res.Headers.Location);
491res.Headers.Location,
513res.Headers.Location,
533settings.ValidateChallengeRedirect(res.Headers.Location, OpenIdConnectParameterNames.Prompt);
534Assert.Contains("prompt=consent", res.Headers.Location.Query);
557settings.ValidateChallengeRedirect(res.Headers.Location);
558Assert.Contains("prompt=login", res.Headers.Location.Query);
579settings.ValidateChallengeRedirect(res.Headers.Location);
580Assert.Contains("prompt=login", res.Headers.Location.Query);
603settings.ValidateChallengeRedirect(res.Headers.Location);
604Assert.Contains("scope=baz%20qux", res.Headers.Location.Query);
627settings.ValidateChallengeRedirect(res.Headers.Location);
628Assert.Contains("scope=baz%20qux", res.Headers.Location.Query);
651settings.ValidateChallengeRedirect(res.Headers.Location);
652Assert.Contains("max_age=1234", res.Headers.Location.Query);
673settings.ValidateChallengeRedirect(res.Headers.Location);
674Assert.Contains("max_age=1234", res.Headers.Location.Query);
694settings.ValidateChallengeRedirect(res.Headers.Location);
695Assert.Contains("prompt=login&audience=https%3A%2F%2Fapi.example.com", res.Headers.Location.Query);
723Assert.Contains("request_uri=my_reference_value", res.Headers.Location.Query);
724Assert.Contains("client_id=Test%20Id", res.Headers.Location.Query);
727Assert.DoesNotContain("redirect_uri", res.Headers.Location.Query);
728Assert.DoesNotContain("scope", res.Headers.Location.Query);
729Assert.DoesNotContain("client_secret", res.Headers.Location.Query);
813Assert.DoesNotContain("request_uri=my_reference_value", res.Headers.Location.Query);
817Assert.Contains("redirect_uri", res.Headers.Location.Query);
818Assert.Contains("scope", res.Headers.Location.Query);
851Assert.Contains("request_uri=request_uri_from_event", res.Headers.Location.Query);
886Assert.DoesNotContain("scope", res.Headers.Location.Query);
917Assert.Contains("request_uri=my_reference_value", res.Headers.Location.Query);
918Assert.Contains("client_id=Test%20Id", res.Headers.Location.Query);
921Assert.DoesNotContain("prompt", res.Headers.Location.Query);
OpenIdConnect\OpenIdConnectTests.cs (19)
51Assert.NotNull(res.Headers.Location);
54transaction.Response.Headers.Location,
78Assert.NotNull(res.Headers.Location);
79var setCookie = Assert.Single(res.Headers, h => h.Key == "Set-Cookie");
105Assert.NotNull(res.Headers.Location);
106var setCookie = Assert.Single(res.Headers, h => h.Key == "Set-Cookie");
131Assert.NotNull(res.Headers.Location);
132var setCookie = Assert.Single(res.Headers, h => h.Key == "Set-Cookie");
158Assert.NotNull(res.Headers.Location);
159var setCookie = Assert.Single(res.Headers, h => h.Key == "Set-Cookie");
183Assert.DoesNotContain(OpenIdConnectParameterNames.SkuTelemetry, res.Headers.Location.Query);
184Assert.DoesNotContain(OpenIdConnectParameterNames.VersionTelemetry, res.Headers.Location.Query);
185setting.ValidateSignoutRedirect(transaction.Response.Headers.Location);
220settings.ValidateSignoutRedirect(transaction.Response.Headers.Location,
242var query = transaction.Response.Headers.Location.Query.Substring(1).Split('&')
273var query = transaction.Response.Headers.Location.Query.Substring(1).Split('&')
321Assert.DoesNotContain(remoteSignOutTransaction.Response.Headers, h => h.Key == "Set-Cookie");
345Assert.DoesNotContain(remoteSignOutTransaction.Response.Headers, h => h.Key == "Set-Cookie");
369Assert.Contains(remoteSignOutTransaction.Response.Headers, h => h.Key == "Set-Cookie");
Microsoft.AspNetCore.CookiePolicy.Test (2)
Microsoft.AspNetCore.Cors.Test (14)
CorsMiddlewareTests.cs (14)
57Assert.Single(response.Headers);
59Assert.Equal(OriginUrl, response.Headers.GetValues(CorsConstants.AccessControlAllowOrigin).FirstOrDefault());
99Assert.Equal(2, response.Headers.Count());
101Assert.Equal(OriginUrl, response.Headers.GetValues(CorsConstants.AccessControlAllowOrigin).FirstOrDefault());
102Assert.Equal("AllowedHeader", response.Headers.GetValues(CorsConstants.AccessControlExposeHeaders).FirstOrDefault());
150Assert.Single(response.Headers);
151Assert.Equal(OriginUrl, response.Headers.GetValues(CorsConstants.AccessControlAllowOrigin).FirstOrDefault());
201response.Headers.OrderBy(h => h.Key),
267response.Headers.OrderBy(h => h.Key),
328Assert.Empty(response.Headers);
370Assert.Empty(response.Headers);
488response.Headers.OrderBy(h => h.Key),
545response.Headers.OrderBy(o => o.Key),
623response.Headers.OrderBy(o => o.Key),
Microsoft.AspNetCore.Diagnostics.HealthChecks.Tests (4)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Microsoft.AspNetCore.Diagnostics.Tests (20)
ExceptionHandlerTest.cs (19)
186Assert.True(response.Headers.CacheControl.NoCache);
187Assert.True(response.Headers.CacheControl.NoStore);
188Assert.True(response.Headers.TryGetValues("Pragma", out values));
194Assert.False(response.Headers.TryGetValues("ETag", out values));
242Assert.True(response.Headers.CacheControl.NoCache);
243Assert.True(response.Headers.CacheControl.NoStore);
244Assert.True(response.Headers.TryGetValues("Pragma", out values));
250Assert.False(response.Headers.TryGetValues("ETag", out values));
297Assert.True(response.Headers.TryGetValues("Cache-Control", out values));
300Assert.True(response.Headers.TryGetValues("Pragma", out values));
306Assert.True(response.Headers.TryGetValues("ETag", out values));
369Assert.True(response.Headers.CacheControl.NoCache);
370Assert.True(response.Headers.CacheControl.NoStore);
371Assert.True(response.Headers.TryGetValues("Pragma", out values));
374Assert.False(response.Headers.TryGetValues("Expires", out _));
375Assert.False(response.Headers.TryGetValues("ETag", out _));
439Assert.True(response.Headers.TryGetValues("Cache-Control", out values));
442Assert.True(response.Headers.TryGetValues("Pragma", out values));
448Assert.True(response.Headers.TryGetValues("ETag", out values));
Microsoft.AspNetCore.FunctionalTests (3)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
Microsoft.AspNetCore.HttpsPolicy.Tests (16)
Microsoft.AspNetCore.Identity.FunctionalTests (7)
Microsoft.AspNetCore.Identity.InMemory.Test (2)
Microsoft.AspNetCore.Mvc.FunctionalTests (105)
RazorPagesTest.cs (20)
508request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location);
533request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location);
558request = new HttpRequestMessage(HttpMethod.Get, response.Headers.Location);
618Assert.Equal("/Login?ReturnUrl=%2FHelloWorldWithAuth", response.Headers.Location.PathAndQuery);
961Assert.Equal(expected, response.Headers.Location.ToString());
975Assert.Equal(expected, response.Headers.Location.ToString());
997Assert.Equal(expected, response.Headers.Location.ToString());
1011Assert.Equal(expected, response.Headers.Location.ToString());
1025Assert.Equal(expected, response.Headers.Location.ToString());
1039Assert.Equal(expected, response.Headers.Location.ToString());
1053Assert.Equal(expected, response.Headers.Location.ToString());
1065Assert.Equal(expected, response.Headers.Location.ToString());
1077Assert.Equal(expected, response.Headers.Location.ToString());
1089Assert.Equal(expected, response.Headers.Location.ToString());
1103Assert.Equal(expected, response.Headers.Location.ToString());
1115Assert.Equal(expected, response.Headers.Location.ToString());
1214Assert.Equal("/Login?ReturnUrl=%2FPages%2FModelWithAuthFilter", response.Headers.Location.PathAndQuery);
1225Assert.Equal("/Login?ReturnUrl=%2FPages%2FAdmin%2FEdit", response.Headers.Location.PathAndQuery);
1252var cacheControl = response.Headers.CacheControl;
1513var setCookie = response.Headers.GetValues("Set-Cookie").ToArray();
RazorPagesWithBasePathTest.cs (10)
114Assert.Equal("/Login?ReturnUrl=%2FConventions%2FAuth", response.Headers.Location.PathAndQuery);
125Assert.Equal("/Login?ReturnUrl=%2FConventions%2FAuthFolder", response.Headers.Location.PathAndQuery);
260Assert.Equal(expected, response.Headers.Location.ToString());
274Assert.Equal(expected, response.Headers.Location.ToString());
393Assert.Equal("/Login?ReturnUrl=%2FAccounts%2FRequiresAuth", response.Headers.Location.PathAndQuery);
478Assert.Equal("/", response.Headers.Location.ToString());
727Assert.Equal("/Login?ReturnUrl=%2FFilters%2FAuthFilterOnPage", response.Headers.Location.PathAndQuery);
738Assert.Equal("/Login?ReturnUrl=%2FFilters%2FAuthFilterOnPageWithModel", response.Headers.Location.PathAndQuery);
749Assert.Equal(new[] { "PageModelFilterValue" }, response.Headers.GetValues("PageModelFilterKey"));
750Assert.Equal(new[] { "PageFilterValue" }, response.Headers.GetValues("PageFilterKey"));
Microsoft.AspNetCore.Mvc.Testing (2)
Microsoft.AspNetCore.OutputCaching.Tests (16)
Microsoft.AspNetCore.ResponseCaching.Tests (16)
Microsoft.AspNetCore.ResponseCompression.Tests (3)
Microsoft.AspNetCore.Rewrite.Tests (37)
IISUrlRewrite\MiddleWareTests.cs (10)
47Assert.Equal("/article.aspx?id=10&title=hey", response.Headers.Location.OriginalString);
147Assert.Equal("/hello", response.Headers.Location.OriginalString);
182Assert.Equal("/hey/hello", response.Headers.Location.OriginalString);
217Assert.Equal("/hey/hello/", response.Headers.Location.OriginalString);
251Assert.Equal("https://example.com/", response.Headers.Location.OriginalString);
365Assert.Equal("/", response.Headers.Location.OriginalString);
434Assert.Equal("/foo", response.Headers.Location.OriginalString);
472Assert.Equal("/hey/hello/", response.Headers.Location.OriginalString);
508Assert.Equal("/blogposts/article/abc?p1=123&p2=abc", response.Headers.Location.OriginalString);
544Assert.Equal("/blog/article/23/abc?p1=123&p2=abc", response.Headers.Location.OriginalString);
MiddlewareTests.cs (23)
174Assert.Equal(expectedUrl, response.Headers.Location.OriginalString);
204Assert.Equal("http://example.com/foo", response.Headers.Location.OriginalString);
228Assert.Equal("http://example.com/foo?bar=1", response.Headers.Location.OriginalString);
256Assert.Equal("https://example.com/", response.Headers.Location.OriginalString);
285Assert.Equal($"https://example.com:{sslPort.GetValueOrDefault().ToString(CultureInfo.InvariantCulture)}/", response.Headers.Location.OriginalString);
289Assert.Equal("https://example.com/", response.Headers.Location.OriginalString);
329Assert.Equal("https://" + expectedHostPathAndQuery, response.Headers.Location.OriginalString);
359Assert.Equal(redirectReplacement, response.Headers.Location.OriginalString);
383Assert.Equal("https://example.com/", response.Headers.Location.OriginalString);
410Assert.Equal(expected, response.Headers.Location.OriginalString);
439Assert.Equal("https://www.example.com/", response.Headers.Location.OriginalString);
468Assert.Equal(redirectUri, response.Headers.Location.OriginalString);
493Assert.Equal("https://www.example.com/", response.Headers.Location.OriginalString);
528Assert.Null(response.Headers.Location);
556Assert.Equal("https://example.com/", response.Headers.Location.OriginalString);
585Assert.Equal(redirectUri, response.Headers.Location.OriginalString);
610Assert.Equal("https://example.com/", response.Headers.Location.OriginalString);
634Assert.Equal("/", response.Headers.Location.OriginalString);
726Assert.Equal("/foo", response.Headers.Location.OriginalString);
755Assert.Null(response.Headers.Location);
783Assert.Equal(redirectUri, response.Headers.Location.OriginalString);
808Assert.Equal("https://www.example.com/", response.Headers.Location.OriginalString);
837Assert.Equal("https://www.example.com/", response.Headers.Location.OriginalString);
Microsoft.AspNetCore.Routing.FunctionalTests (4)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (111)
AuthenticationTests.cs (12)
40Assert.Empty(response.Headers.WwwAuthenticate);
58Assert.Equal(authType.ToString(), response.Headers.WwwAuthenticate.ToString(), StringComparer.OrdinalIgnoreCase);
80Assert.Equal(authType.ToString(), response.Headers.WwwAuthenticate.ToString(), StringComparer.OrdinalIgnoreCase);
106Assert.Equal("Negotiate, NTLM, basic", response.Headers.WwwAuthenticate.ToString(), StringComparer.OrdinalIgnoreCase);
215Assert.Empty(response.Headers.WwwAuthenticate);
260Assert.Equal(authTypeList.Count(), response.Headers.WwwAuthenticate.Count);
283Assert.Equal(authTypeList.Count(), response.Headers.WwwAuthenticate.Count);
301Assert.Equal(3, response.Headers.WwwAuthenticate.Count);
327Assert.Equal(authTypeList.Count(), response.Headers.WwwAuthenticate.Count);
345Assert.Empty(response.Headers.WwwAuthenticate);
366Assert.Single(response.Headers.WwwAuthenticate);
367Assert.Equal(authType.ToString(), response.Headers.WwwAuthenticate.First().Scheme);
Listener\ResponseHeaderTests.cs (34)
40Assert.Equal(2, response.Headers.Count());
41Assert.False(response.Headers.TransferEncodingChunked.HasValue);
42Assert.True(response.Headers.Date.HasValue);
43Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString());
62Assert.Equal(3, response.Headers.Count());
63Assert.False(response.Headers.TransferEncodingChunked.HasValue);
64Assert.True(response.Headers.ConnectionClose.Value);
65Assert.True(response.Headers.Date.HasValue);
66Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString());
85Assert.Equal(2, response.Headers.Count());
86Assert.False(response.Headers.TransferEncodingChunked.HasValue);
87Assert.True(response.Headers.Date.HasValue);
88Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString());
113Assert.Equal(3, response.Headers.Count());
114Assert.False(response.Headers.TransferEncodingChunked.HasValue);
115Assert.True(response.Headers.ConnectionClose.Value);
116Assert.True(response.Headers.Date.HasValue);
117Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString());
143Assert.Equal(2, response.Headers.Count());
144Assert.False(response.Headers.TransferEncodingChunked.HasValue);
145Assert.True(response.Headers.Date.HasValue);
146Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString());
172Assert.Equal(2, response.Headers.Count());
173Assert.False(response.Headers.TransferEncodingChunked.HasValue);
174Assert.True(response.Headers.Date.HasValue);
175Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString());
195Assert.Equal(2, response.Headers.Count());
196Assert.False(response.Headers.TransferEncodingChunked.HasValue);
197Assert.True(response.Headers.Date.HasValue);
198Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString());
235Assert.Null(response.Headers.ConnectionClose);
245Assert.Null(response.Headers.ConnectionClose);
270Assert.True(response.Headers.TransferEncodingChunked.HasValue, "Chunked");
271Assert.True(response.Headers.ConnectionClose.Value);
ResponseHeaderTests.cs (28)
31Assert.Equal(2, response.Headers.Count());
32Assert.False(response.Headers.TransferEncodingChunked.HasValue);
33Assert.True(response.Headers.Date.HasValue);
34Assert.Equal("Microsoft-HTTPAPI/2.0", response.Headers.Server.ToString());
132Assert.True(response.Headers.TryGetValues("Custom-Header1", out var header));
151Assert.True(response.Headers.ConnectionClose.Value);
152Assert.Equal(new string[] { "close" }, response.Headers.GetValues("Connection"));
153Assert.True(response.Headers.TransferEncodingChunked.HasValue);
154Assert.True(response.Headers.TransferEncodingChunked);
177Assert.True(response.Headers.ConnectionClose.Value);
178Assert.Equal(new string[] { "close" }, response.Headers.GetValues("Connection"));
179Assert.False(response.Headers.TransferEncodingChunked.HasValue);
204Assert.True(response.Headers.TransferEncodingChunked.HasValue);
206Assert.True(response.Headers.ConnectionClose.Value);
207Assert.Equal(new string[] { "close" }, response.Headers.GetValues("Connection"));
235Assert.Equal(5, response.Headers.Count()); // Date, Server, Chunked
237Assert.Equal(2, response.Headers.GetValues("Custom1").Count());
238Assert.Equal("value1a", response.Headers.GetValues("Custom1").First());
239Assert.Equal("value1b", response.Headers.GetValues("Custom1").Skip(1).First());
240Assert.Single(response.Headers.GetValues("Custom2"));
241Assert.Equal("value2a, value2b", response.Headers.GetValues("Custom2").First());
265Assert.Equal(5, response.Headers.Count()); // Date, Server, Chunked
267Assert.Equal(2, response.Headers.GetValues("Custom1").Count());
268Assert.Equal("value1a", response.Headers.GetValues("Custom1").First());
269Assert.Equal("value1b", response.Headers.GetValues("Custom1").Skip(1).First());
270Assert.Single(response.Headers.GetValues("Custom2"));
271Assert.Equal("value2a, value2b", response.Headers.GetValues("Custom2").First());
288var headers = response.Headers;
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (4)
Microsoft.AspNetCore.Session.Tests (8)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.StaticAssets.Tests (18)
StaticAssetsIntegrationTests.cs (18)
64Assert.Equal($"\"{GetEtag("Hello, World!")}\"", response.Headers.ETag.Tag);
114Assert.Equal($"\"{GetEtag("Hello, World!")}\"", response.Headers.ETag.Tag);
118Assert.True(response.Headers.CacheControl.NoCache);
166Assert.Equal($"\"{GetEtag("Hello, World!")}\"", response.Headers.ETag.Tag);
170Assert.Equal("immutable", response.Headers.CacheControl.ToString());
335Assert.Equal($"\"3/1gIbsr1bCvZ2KQgJ7DpTGR3YHH9wpLKGiKNiGCmG8=\"", response.Headers.ETag.Tag);
388Assert.Equal($"\"+fvSyRQcr4/t/rcA0u1KfZ8c3CpXxBDxsxDhnAftNqg=\"", response.Headers.ETag.Tag);
444Assert.Equal(GetGzipEtag(Path.Combine(webRoot, "sample.txt")), response.Headers.ETag.Tag);
625Assert.NotNull(response.Headers.ETag);
626Assert.NotNull(response.Headers.ETag.Tag);
635Assert.Equal(response2.Headers.ETag, response1.Headers.ETag);
665req.Headers.Add("If-Match", original.Headers.ETag.ToString());
714req2.Headers.Add("If-None-Match", resp1.Headers.ETag.ToString());
740req2.Headers.Add("If-None-Match", resp1.Headers.ETag.ToString());
787req2.Headers.Add("If-None-Match", resp1.Headers.ETag.ToString());
801var etag = resp1.Headers.ETag.ToString();
835req3.Headers.IfNoneMatch.Add(resp1.Headers.ETag);
Microsoft.AspNetCore.StaticFiles.Tests (26)
Microsoft.AspNetCore.TestHost (1)
Microsoft.AspNetCore.TestHost.Tests (10)
Microsoft.AspNetCore.WebSockets.Tests (3)
Microsoft.DotNet.Build.Tasks.Feed (2)
Microsoft.DotNet.VersionTools (1)
Microsoft.Extensions.Http (2)
Microsoft.Extensions.Http.Diagnostics (2)
Microsoft.Extensions.Http.Diagnostics.Tests (23)
Microsoft.Extensions.Http.Resilience (1)
Microsoft.Extensions.Http.Resilience.Tests (3)
Microsoft.Extensions.ML (3)
Microsoft.ML.Core (1)
Negotiate.Client (3)
ServerComparison.FunctionalTests (16)
ResponseTests.cs (12)
139Assert.Null(response.Headers.TransferEncodingChunked);
140Assert.Null(response.Headers.ConnectionClose);
159Assert.True(response.Headers.ConnectionClose, "/connectionclose, closed?");
160Assert.True(response.Headers.TransferEncodingChunked);
184Assert.True(response.Headers.ConnectionClose, "/connectionclose, closed?");
185Assert.Null(response.Headers.TransferEncodingChunked);
209Assert.True(response.Headers.TransferEncodingChunked, "/chunked, chunked?");
210Assert.Null(response.Headers.ConnectionClose);
234Assert.True(response.Headers.TransferEncodingChunked, "/manuallychunked, chunked?");
235Assert.Null(response.Headers.ConnectionClose);
254Assert.True(response.Headers.TransferEncodingChunked, "/manuallychunkedandclose, chunked?");
255Assert.True(response.Headers.ConnectionClose, "/manuallychunkedandclose, closed?");
Sockets.FunctionalTests (1)
System.Net.Http (13)
System.Net.Requests (1)
System.Net.WebSockets.Client (6)