307 references to Add
Aspire.Hosting.PostgreSQL.Tests (1)
dotnet-svcutil-lib (1)
IIS.FunctionalTests (6)
IISExpress.FunctionalTests (6)
Interop.FunctionalTests (6)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
Microsoft.AspNetCore.Authentication.Test (16)
Microsoft.AspNetCore.Authentication.Twitter (2)
Microsoft.AspNetCore.CookiePolicy.Test (1)
Microsoft.AspNetCore.HeaderPropagation.Tests (5)
Microsoft.AspNetCore.Http.Connections.Client (5)
Microsoft.AspNetCore.HttpOverrides.Tests (1)
Microsoft.AspNetCore.Identity.FunctionalTests (2)
Microsoft.AspNetCore.Identity.InMemory.Test (2)
Microsoft.AspNetCore.Localization.FunctionalTests (2)
Microsoft.AspNetCore.Localization.Tests (5)
Microsoft.AspNetCore.Mvc.FunctionalTests (97)
AuthMiddlewareAndFilterTestBase.cs (11)
57request.Headers.Add("Cookie", authCookie);
75request.Headers.Add("Cookie", authCookie);
82request.Headers.Add("Cookie", authCookie);
121request.Headers.Add("Cookie", authCookie);
171request.Headers.Add("Cookie", cookie);
190request.Headers.Add("Cookie", cookie);
205request.Headers.Add("Cookie", cookie);
210request.Headers.Add("Cookie", cookie);
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");
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 (1)
Microsoft.AspNetCore.Routing.FunctionalTests (7)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
Microsoft.AspNetCore.Session.Tests (5)
Microsoft.AspNetCore.StaticAssets.Tests (10)
StaticAssetsIntegrationTests.cs (10)
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());
804req2.Headers.Add("If-Match", etag + ", " + etag);
811req3.Headers.Add("If-Match", etag + ", \"badetag\"");
Microsoft.AspNetCore.StaticFiles.Tests (37)
RangeHeaderTests.cs (30)
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);
423req.Headers.Add("Range", "bytes=" + ranges);
443req.Headers.Add("Range", "bytes=" + range);
Microsoft.AspNetCore.TestHost.Tests (1)
Microsoft.AspNetCore.Tests (2)
Microsoft.AspNetCore.WebSockets.Tests (13)
WebSocketCompressionMiddlewareTests.cs (5)
37request.Headers.Add(HeaderNames.SecWebSocketExtensions, "permessage-deflate");
65request.Headers.Add(HeaderNames.SecWebSocketExtensions, "permessage-deflate");
99request.Headers.Add(HeaderNames.SecWebSocketExtensions, clientHeader);
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 (8)
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");
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));
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.Build.Tasks.Feed (1)
Microsoft.DotNet.Deployment.Tasks.Links (1)
Microsoft.DotNet.Git.IssueManager (1)
Microsoft.DotNet.Internal.SymbolHelper (1)
Microsoft.DotNet.VersionTools (4)
Microsoft.Extensions.Http.Diagnostics (1)
Microsoft.Extensions.Http.Diagnostics.PerformanceTests (1)
Microsoft.Extensions.Http.Diagnostics.Tests (52)
Logging\HttpClientLoggerTest.cs (16)
190httpRequestMessage.Headers.Add(TestRequestHeader, testRequestHeaderValue);
191httpRequestMessage.Headers.Add("Header3", testRequestHeaderValue);
199httpResponseMessage.Headers.Add(TestResponseHeader, testResponseHeaderValue);
200httpResponseMessage.Headers.Add("Header3", testRequestHeaderValue);
285httpRequestMessage.Headers.Add(TestRequestHeader, requestHeaderValue);
292httpResponseMessage.Headers.Add(TestResponseHeader, responseHeaderValue);
391httpRequestMessage.Headers.Add(TestRequestHeader, requestHeaderValue);
399httpResponseMessage.Headers.Add(TestResponseHeader, responseHeaderValue);
487httpRequestMessage.Headers.Add(TestRequestHeader, requestHeaderValue);
495httpResponseMessage.Headers.Add(TestResponseHeader, responseHeaderValue);
601httpRequestMessage.Headers.Add(TestRequestHeader, requestHeaderValue);
608httpResponseMessage.Headers.Add(TestResponseHeader, responseHeaderValue);
860requestContent.Headers.Add("Content-Type", TextPlain);
868httpRequestMessage.Headers.Add(TestRequestHeader, requestHeaderValue);
871responseContent.Headers.Add("Content-Type", TextPlain);
878httpResponseMessage.Headers.Add(TestResponseHeader, responseHeaderValue);
Logging\HttpHeadersReaderTest.cs (13)
74httpRequest.Headers.Add("Header1", "Value.1");
75httpRequest.Headers.Add("Header2", "Value.2");
76httpResponse.Headers.Add("Header3", "Value.3");
77httpResponse.Headers.Add("Header4", "Value.4");
78httpRequest.Headers.Add("Header5", string.Empty);
79httpResponse.Headers.Add("Header6", string.Empty);
80httpResponse.Headers.Add("Header7", "Value.7");
134requestContent.Headers.Add("Content-Header1", "Content.1");
137httpRequest.Headers.Add("Header1", "Value.1");
138httpRequest.Headers.Add("Header2", "Value.2");
143responseContent.Headers.Add("Content-Header2", "Content.2");
146httpResponse.Headers.Add("Header3", "Value.3");
147httpResponse.Headers.Add("Header4", "Value.4");
Logging\HttpRequestReaderTest.cs (15)
87httpRequestMessage.Headers.Add(header1.Key, header1.Value);
88httpRequestMessage.Headers.Add(header3.Key, header3.Value);
96httpResponseMessage.Headers.Add(header2.Key, header2.Value);
97httpResponseMessage.Headers.Add(header3.Key, header3.Value);
213httpRequestMessage.Headers.Add(header1.Key, header1.Value);
225httpResponseMessage.Headers.Add(header2.Key, header2.Value);
288httpRequestMessage.Headers.Add(header1.Key, header1.Value);
300httpResponseMessage.Headers.Add(header2.Key, header2.Value);
360httpRequestMessage.Headers.Add(header1.Key, header1.Value);
418httpRequestMessage.Headers.Add(header1.Key, header1.Value);
430httpResponseMessage.Headers.Add(header2.Key, header2.Value);
489httpRequestMessage.Headers.Add(header1.Key, header1.Value);
497httpResponseMessage.Headers.Add(header2.Key, header2.Value);
556httpRequestMessage.Headers.Add(header1.Key, header1.Value);
565httpResponseMessage.Headers.Add(header2.Key, header2.Value);
Microsoft.Extensions.Http.Resilience.Tests (1)
Microsoft.Extensions.Logging.AzureAppServices (2)
Templates.Blazor.Tests (1)
Templates.Blazor.WebAssembly.Auth.Tests (1)
Templates.Blazor.WebAssembly.Tests (1)
Templates.Mvc.Tests (1)
Templates.Tests (1)