5 writes to Headers
Microsoft.DotNet.Internal.SymbolHelper (4)
Microsoft.Extensions.Logging.AzureAppServices (1)
613 references to Headers
Aspire.Dashboard.Tests (19)
Integration\OtlpCorsHttpServiceTests.cs (15)
31preflightRequest.Headers.TryAddWithoutValidation("Access-Control-Request-Method", "POST");
32preflightRequest.Headers.TryAddWithoutValidation("Access-Control-Request-Headers", "x-requested-with,x-custom,Content-Type");
33preflightRequest.Headers.TryAddWithoutValidation("Origin", "http://localhost:8000");
56preflightRequest1.Headers.TryAddWithoutValidation("Access-Control-Request-Method", "POST");
57preflightRequest1.Headers.TryAddWithoutValidation("Access-Control-Request-Headers", "x-requested-with,x-custom,Content-Type");
58preflightRequest1.Headers.TryAddWithoutValidation("Origin", "http://localhost:8000");
70preflightRequest2.Headers.TryAddWithoutValidation("Access-Control-Request-Method", "POST");
71preflightRequest2.Headers.TryAddWithoutValidation("Access-Control-Request-Headers", "x-requested-with,x-custom,Content-Type");
72preflightRequest2.Headers.TryAddWithoutValidation("Origin", "http://localhost:8001");
96preflightRequest.Headers.TryAddWithoutValidation("Access-Control-Request-Method", "POST");
97preflightRequest.Headers.TryAddWithoutValidation("Access-Control-Request-Headers", "x-requested-with,x-custom,Content-Type");
98preflightRequest.Headers.TryAddWithoutValidation("Origin", "http://localhost:8001");
124preflightRequest.Headers.TryAddWithoutValidation("Access-Control-Request-Method", "POST");
125preflightRequest.Headers.TryAddWithoutValidation("Access-Control-Request-Headers", "x-requested-with,x-custom,Content-Type");
126preflightRequest.Headers.TryAddWithoutValidation("Origin", "http://localhost:8000");
AuthSamples.FunctionalTests (1)
Binding.ReliableSession.IntegrationTests (2)
Diagnostics.FunctionalTests (5)
dotnet-svcutil-lib (17)
HeaderPropagationSample (1)
HttpStress (1)
IIS.FunctionalTests (5)
IISExpress.FunctionalTests (5)
Interop.FunctionalTests (16)
Keycloak.Web (1)
Microsoft.AspNetCore.Authentication.Google (1)
Microsoft.AspNetCore.Authentication.MicrosoftAccount (1)
Microsoft.AspNetCore.Authentication.OAuth (1)
Microsoft.AspNetCore.Authentication.OpenIdConnect (1)
Microsoft.AspNetCore.Authentication.Test (11)
Microsoft.AspNetCore.Authentication.Twitter (2)
Microsoft.AspNetCore.CookiePolicy.Test (1)
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (2)
Microsoft.AspNetCore.Diagnostics.Tests (4)
Microsoft.AspNetCore.HeaderPropagation (3)
Microsoft.AspNetCore.HeaderPropagation.Tests (7)
Microsoft.AspNetCore.Http.Connections.Client (6)
Microsoft.AspNetCore.HttpLogging.Tests (3)
Microsoft.AspNetCore.HttpOverrides.Tests (1)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.Identity.InMemory.Test (2)
Microsoft.AspNetCore.Localization.FunctionalTests (2)
Microsoft.AspNetCore.Mvc.FunctionalTests (197)
AuthMiddlewareAndFilterTestBase.cs (14)
57request.Headers.Add("Cookie", authCookie);
75request.Headers.Add("Cookie", authCookie);
82request.Headers.Add("Cookie", authCookie);
121request.Headers.Add("Cookie", authCookie);
137request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
156request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
171request.Headers.Add("Cookie", cookie);
190request.Headers.Add("Cookie", cookie);
205request.Headers.Add("Cookie", cookie);
210request.Headers.Add("Cookie", cookie);
217request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
218request.Headers.Add("Cookie", cookie);
252request.Headers.Add("Cookie", authCookie);
259request.Headers.Add("Cookie", authCookie);
CorsTestsBase.cs (30)
45request.Headers.Add(CorsConstants.Origin, origin);
81request.Headers.Add(CorsConstants.Origin, "http://example.com");
82request.Headers.Add(CorsConstants.AccessControlRequestMethod, "POST");
99request.Headers.Add(CorsConstants.Origin, "http://example.com");
100request.Headers.Add(CorsConstants.AccessControlRequestMethod, "POST");
122request.Headers.Add(CorsConstants.Origin, "http://example.com");
123request.Headers.Add(CorsConstants.AccessControlRequestMethod, method);
124request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "Custom");
159request.Headers.Add(CorsConstants.Origin, "http://example.com");
160request.Headers.Add(CorsConstants.AccessControlExposeHeaders, "exposed1,exposed2");
191request.Headers.Add(CorsConstants.Origin, "http://example.com");
192request.Headers.Add(CorsConstants.AccessControlRequestMethod, "PUT");
193request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "header1,header2");
225request.Headers.Add(CorsConstants.Origin, "http://example2.com");
250request.Headers.Add(CorsConstants.Origin, "http://example.com");
276request.Headers.Add(CorsConstants.Origin, "http://example.com");
277request.Headers.Add(CorsConstants.AccessControlRequestMethod, method);
278request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "Custom");
301request.Headers.Add(CorsConstants.Origin, "http://example.com");
302request.Headers.Add(CorsConstants.AccessControlRequestMethod, "GET");
303request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "Custom");
333request.Headers.Add(CorsConstants.Origin, "http://example.com");
334request.Headers.Add(CorsConstants.AccessControlRequestMethod, "GET");
335request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "Custom");
372request.Headers.Add(CorsConstants.Origin, "http://example.com");
373request.Headers.Add(CorsConstants.AccessControlRequestMethod, "GET");
374request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "Custom");
395request.Headers.Add(CorsConstants.Origin, "http://notexpecteddomain.com");
396request.Headers.Add(CorsConstants.AccessControlRequestMethod, "GET");
397request.Headers.Add(CorsConstants.AccessControlRequestHeaders, "Custom");
FileResultTests.cs (43)
60httpRequestMessage.Headers.Range = new RangeHeaderValue(start, end);
82httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
102httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
124httpRequestMessage.Headers.Range = new RangeHeaderValue(start, end);
146httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
166httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
210httpRequestMessage.Headers.Range = new RangeHeaderValue(0, 6);
228httpRequestMessage.Headers.Range = new RangeHeaderValue(0, 6);
229httpRequestMessage.Headers.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\""));
248httpRequestMessage.Headers.Range = new RangeHeaderValue(0, 6);
249httpRequestMessage.Headers.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"NotEtag\""));
280httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
281httpRequestMessage.Headers.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\""));
347httpRequestMessage.Headers.Range = new RangeHeaderValue(start, end);
369httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
389httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
431httpRequestMessage.Headers.Range = new RangeHeaderValue(0, 6);
449httpRequestMessage.Headers.Range = new RangeHeaderValue(0, 6);
450httpRequestMessage.Headers.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\""));
469httpRequestMessage.Headers.Range = new RangeHeaderValue(0, 6);
470httpRequestMessage.Headers.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"NotEtag\""));
499httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
500httpRequestMessage.Headers.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\""));
548httpRequestMessage.Headers.Range = new RangeHeaderValue(start, end);
570httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
590httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
635httpRequestMessage.Headers.Range = new RangeHeaderValue(0, 6);
653httpRequestMessage.Headers.Range = new RangeHeaderValue(0, 6);
654httpRequestMessage.Headers.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\""));
673httpRequestMessage.Headers.Range = new RangeHeaderValue(0, 6);
674httpRequestMessage.Headers.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"NotEtag\""));
705httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
706httpRequestMessage.Headers.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\""));
761httpRequestMessage.Headers.Range = new RangeHeaderValue(start, end);
785httpRequestMessage.Headers.Range = new RangeHeaderValue(0, 6);
803httpRequestMessage.Headers.Range = new RangeHeaderValue(0, 6);
804httpRequestMessage.Headers.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\""));
826httpRequestMessage.Headers.Range = new RangeHeaderValue(0, 6);
827httpRequestMessage.Headers.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"NotEtag\""));
851httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
874httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
909httpRequestMessage.Headers.TryAddWithoutValidation("Range", rangeString);
910httpRequestMessage.Headers.IfRange = new RangeConditionHeaderValue(new EntityTagHeaderValue("\"Etag\""));
RazorPagesTest.cs (18)
102postRequest.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value);
103postRequest.Headers.Add("RequestVerificationToken", formToken);
134postRequest.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value);
135postRequest.Headers.Add("RequestVerificationToken", formToken);
215postRequest.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value);
216postRequest.Headers.Add("RequestVerificationToken", formToken);
247postRequest.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value);
248postRequest.Headers.Add("RequestVerificationToken", formToken);
417postRequest.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value);
418postRequest.Headers.Add("RequestVerificationToken", formToken);
509request.Headers.Add("Cookie", GetCookie(response));
534request.Headers.Add("Cookie", GetCookie(response));
559request.Headers.Add("Cookie", GetCookie(response));
581request.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value);
582request.Headers.Add("RequestVerificationToken", formToken);
595request.Headers.Add("Cookie", GetCookie(response));
1507request.Headers.Add("Cookie", cookie.Key + "=" + cookie.Value);
1508request.Headers.Add("RequestVerificationToken", formToken);
Microsoft.AspNetCore.Mvc.Testing (3)
Microsoft.AspNetCore.ResponseCompression.Tests (17)
Microsoft.AspNetCore.Routing.FunctionalTests (7)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
Microsoft.AspNetCore.Server.IISIntegration.Tests (13)
IISMiddlewareTests.cs (13)
55req.Headers.TryAddWithoutValidation("MS-ASPNETCORE-TOKEN", "TestToken");
135request.Headers.TryAddWithoutValidation("MS-ASPNETCORE-TOKEN", "TestToken");
136request.Headers.TryAddWithoutValidation("MS-ASPNETCORE-EVENT", shutdownEvent);
194request.Headers.TryAddWithoutValidation("MS-ASPNETCORE-TOKEN", "TestToken");
195request.Headers.TryAddWithoutValidation("MS-ASPNETCORE-EVENT", "shutdown");
239request.Headers.TryAddWithoutValidation("MS-ASPNETCORE-TOKEN", "TestToken");
240request.Headers.TryAddWithoutValidation("MS-ASPNETCORE-EVENT", "shutdown");
284request.Headers.TryAddWithoutValidation("MS-ASPNETCORE-TOKEN", "TestToken");
285request.Headers.TryAddWithoutValidation("MS-ASPNETCORE-EVENT", shutdownEvent);
384request.Headers.TryAddWithoutValidation("MS-ASPNETCORE-TOKEN", "TestToken");
425req.Headers.TryAddWithoutValidation("MS-ASPNETCORE-TOKEN", "TestToken");
482req.Headers.TryAddWithoutValidation("MS-ASPNETCORE-TOKEN", "TestToken");
527req.Headers.TryAddWithoutValidation("MS-ASPNETCORE-TOKEN", "TestToken");
Microsoft.AspNetCore.SignalR.Client.Tests (18)
Microsoft.AspNetCore.SpaServices.Extensions (2)
Microsoft.AspNetCore.StaticAssets.Tests (28)
StaticAssetsIntegrationTests.cs (28)
439message.Headers.AcceptEncoding.Add(new StringWithQualityHeaderValue("gzip"));
652req.Headers.Add("If-Match", "\"fake\"");
665req.Headers.Add("If-Match", original.Headers.ETag.ToString());
676req.Headers.Add("If-Match", "*");
687req.Headers.Add("If-Match", "*");
714req2.Headers.Add("If-None-Match", resp1.Headers.ETag.ToString());
727req2.Headers.Add("If-None-Match", "*");
740req2.Headers.Add("If-None-Match", resp1.Headers.ETag.ToString());
787req2.Headers.Add("If-None-Match", resp1.Headers.ETag.ToString());
788req2.Headers.IfModifiedSince = resp1.Content.Headers.LastModified;
804req2.Headers.Add("If-Match", etag + ", " + etag);
811req3.Headers.Add("If-Match", etag + ", \"badetag\"");
830req2.Headers.IfNoneMatch.Add(new EntityTagHeaderValue("\"fake\""));
831req2.Headers.IfModifiedSince = lastModified;
835req3.Headers.IfNoneMatch.Add(resp1.Headers.ETag);
836req3.Headers.IfModifiedSince = pastDate;
840req4.Headers.IfNoneMatch.Add(new EntityTagHeaderValue("\"fake\""));
841req4.Headers.IfModifiedSince = futureDate;
868req.Headers.TryAddWithoutValidation("If-Modified-Since", "bad-date");
881req.Headers.IfModifiedSince = DateTimeOffset.Now.AddYears(1);
904req2.Headers.IfModifiedSince = DateTimeOffset.Now;
928req2.Headers.TryAddWithoutValidation("If-Modified-Since", DateTimeOffset.UtcNow.ToString(format, CultureInfo.InvariantCulture));
945req2.Headers.IfModifiedSince = DateTimeOffset.MinValue;
958req.Headers.TryAddWithoutValidation("If-Unmodified-Since", "bad-date");
970req.Headers.IfUnmodifiedSince = DateTimeOffset.Now.AddYears(1);
986req2.Headers.IfUnmodifiedSince = DateTimeOffset.MinValue;
1003req1.Headers.Range = new RangeHeaderValue(0, 4);
1007req2.Headers.Range = new RangeHeaderValue(7, 11);
Microsoft.AspNetCore.StaticFiles.Tests (50)
RangeHeaderTests.cs (34)
24req.Headers.Add("If-Range", original.Headers.ETag.ToString());
25req.Headers.Add("Range", "bytes=0-10");
45req.Headers.Add("If-Range", original.Headers.ETag.ToString());
46req.Headers.Add("Range", "bytes=0-10");
66req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r"));
67req.Headers.Add("Range", "bytes=0-10");
83req.Headers.Add("If-Modified-Since", original.Content.Headers.LastModified.Value.AddHours(-1).ToString("r"));
84req.Headers.Add("Range", "bytes=0-10");
100req.Headers.Add("If-Modified-Since", original.Content.Headers.LastModified.Value.ToString("r"));
101req.Headers.Add("Range", "bytes=0-10");
117req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r"));
118req.Headers.Add("Range", "bytes=0-10");
136req.Headers.Add("If-Range", "\"OldEtag\"");
137req.Headers.Add("Range", "bytes=0-10");
153req.Headers.Add("If-Range", "\"OldEtag\"");
154req.Headers.Add("Range", "bytes=0-10");
172req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.Subtract(TimeSpan.FromDays(1)).ToString("r"));
173req.Headers.Add("Range", "bytes=0-10");
191req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.Subtract(TimeSpan.FromDays(1)).ToString("r"));
192req.Headers.Add("Range", "bytes=0-10");
211req.Headers.Add("If-Range", original.Headers.ETag.ToString());
219req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r"));
238req.Headers.Add("If-Range", original.Headers.ETag.ToString());
246req.Headers.Add("If-Range", original.Content.Headers.LastModified.Value.ToString("r"));
271req.Headers.Add("Range", "bytes=" + range);
292req.Headers.Add("Range", "bytes=" + range);
313req.Headers.Add("Range", "bytes=" + range);
327req.Headers.Add("Range", "bytes=" + range);
345req.Headers.TryAddWithoutValidation("Range", "bytes=" + range);
360req.Headers.TryAddWithoutValidation("Range", "bytes=" + range);
380req.Headers.TryAddWithoutValidation("Range", "bytes=" + range);
402req.Headers.TryAddWithoutValidation("Range", "bytes=" + range);
423req.Headers.Add("Range", "bytes=" + ranges);
443req.Headers.Add("Range", "bytes=" + range);
Microsoft.AspNetCore.TestHost (4)
Microsoft.AspNetCore.TestHost.Tests (2)
Microsoft.AspNetCore.WebSockets.Tests (28)
WebSocketCompressionMiddlewareTests.cs (9)
37request.Headers.Add(HeaderNames.SecWebSocketExtensions, "permessage-deflate");
65request.Headers.Add(HeaderNames.SecWebSocketExtensions, "permessage-deflate");
99request.Headers.Add(HeaderNames.SecWebSocketExtensions, clientHeader);
170request.Headers.Connection.Clear();
171request.Headers.Connection.Add("Upgrade");
172request.Headers.Connection.Add("keep-alive");
173request.Headers.Upgrade.Add(new System.Net.Http.Headers.ProductHeaderValue("websocket"));
174request.Headers.Add(HeaderNames.SecWebSocketVersion, "13");
176request.Headers.Add(HeaderNames.SecWebSocketKey, Convert.ToBase64String(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, Base64FormattingOptions.None));
WebSocketMiddlewareTests.cs (19)
677request.Headers.Connection.Clear();
678request.Headers.Connection.Add("Upgrade");
679request.Headers.Upgrade.Add(new System.Net.Http.Headers.ProductHeaderValue("websocket"));
680request.Headers.Add(HeaderNames.SecWebSocketVersion, "13");
682request.Headers.Add(HeaderNames.SecWebSocketKey, Convert.ToBase64String(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, Base64FormattingOptions.None));
684request.Headers.Add(HeaderNames.Origin, "http://example.com");
710request.Headers.Add("Origin", "http://notexample.com");
760request.Headers.Connection.Clear();
761request.Headers.Connection.Add("Upgrade");
762request.Headers.Connection.Add("keep-alive");
763request.Headers.Upgrade.Add(new System.Net.Http.Headers.ProductHeaderValue("websocket"));
764request.Headers.Upgrade.Add(new System.Net.Http.Headers.ProductHeaderValue("example"));
765request.Headers.Add(HeaderNames.SecWebSocketVersion, "13");
767request.Headers.Add(HeaderNames.SecWebSocketKey, Convert.ToBase64String(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, Base64FormattingOptions.None));
833request.Headers.Connection.Clear();
834request.Headers.Connection.Add("Upgrade");
835request.Headers.Upgrade.Add(new System.Net.Http.Headers.ProductHeaderValue("websocket"));
836request.Headers.Add(HeaderNames.SecWebSocketVersion, "13");
838request.Headers.Add(HeaderNames.SecWebSocketKey, Convert.ToBase64String(new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }, Base64FormattingOptions.None));
Microsoft.DotNet.Internal.SymbolHelper (1)
Microsoft.Extensions.Http (2)
Microsoft.Extensions.Http.Diagnostics (2)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (1)
Microsoft.Extensions.Http.Diagnostics.Tests (31)
Logging\AcceptanceTests.cs (10)
168httpRequestMessage.Headers.Add("requestHeader", "Request Value");
169httpRequestMessage.Headers.Add("ReQuEStHeAdErFirst", new List<string> { "Request Value 2", "Request Value 3" });
184httpRequestMessage2.Headers.Add("requestHeader", "Request Value");
185httpRequestMessage2.Headers.Add("ReQuEStHeAdErSecond", new List<string> { "Request Value 2", "Request Value 3" });
249httpRequestMessage.Headers.Add("requestHeader", "Request Value");
250httpRequestMessage.Headers.Add("ReQuEStHeAdEr2", new List<string> { "Request Value 2", "Request Value 3" });
271httpRequestMessage2.Headers.Add("requestHeader", "Request Value");
272httpRequestMessage2.Headers.Add("ReQuEStHeAdEr2", new List<string> { "Request Value 2", "Request Value 3" });
685httpRequestMessage.Headers.Add("requestHeader", "Request Value");
686httpRequestMessage.Headers.Add("ReQuEStHeAdEr2", new List<string> { "Request Value 2", "Request Value 3" });
Microsoft.Extensions.Http.Resilience (2)
Microsoft.Extensions.Http.Resilience.Tests (2)
Microsoft.Extensions.Logging.AzureAppServices (3)
Microsoft.Extensions.ServiceDiscovery (2)
ServerComparison.FunctionalTests (2)
SocialSample (4)
System.Net.Http (43)
System.Net.Requests (8)
System.Net.WebSockets.Client (8)
Templates.Blazor.Tests (5)
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)