97 references to Append
blazor-devserver (1)
Server\Startup.cs (1)
40ctx.Response.Headers.Append("Blazor-Environment", webHostEnvironment.EnvironmentName);
InMemory.FunctionalTests (21)
Http2\Http2StreamTests.cs (7)
2144Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 2146Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom 你好 Value")); 2147Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 2185Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 2186Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 2188context.Response.Headers.Append("CustomName", "Custom 你好 Value"); 2229context.Response.Headers.Append("CustomName", "Custom 你好 Value");
Http3\Http3StreamTests.cs (7)
862Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 864Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom 你好 Value")); 865Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 896Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 897Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 899context.Response.Headers.Append("CustomName", "Custom 你好 Value"); 931context.Response.Headers.Append("CustomName", "Custom 你好 Value");
ResponseHeaderTests.cs (7)
23Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 26Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom 你好 Value")); 27Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 54Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("Custom你好Name", "Custom Value")); 55Assert.Throws<InvalidOperationException>(() => context.Response.Headers.Append("CustomName", "Custom \r Value")); 58context.Response.Headers.Append("CustomName", "Custom 你好 Value"); 91context.Response.Headers.Append("CustomName", "Custom 你好 Value");
Interop.FunctionalTests (3)
Http3\Http3RequestTests.cs (1)
1348feature.Trailers.Append($"trailer-{i}", new string('!', i));
HttpClientHttp2InteropTests.cs (2)
1092context.Response.Headers.Append("header" + i, oneKbString + i); 1391context.Response.Headers.Append("header" + i, oneKbString + i);
Microsoft.AspNetCore.Authentication.JwtBearer (2)
JwtBearerHandler.cs (2)
302Response.Headers.Append(HeaderNames.WWWAuthenticate, Options.Challenge); 344Response.Headers.Append(HeaderNames.WWWAuthenticate, builder.ToString());
Microsoft.AspNetCore.Authentication.Negotiate (3)
NegotiateHandler.cs (3)
183Response.Headers.Append(HeaderNames.WWWAuthenticate, AuthHeaderPrefix + outgoing); 197Response.Headers.Append(HeaderNames.WWWAuthenticate, AuthHeaderPrefix + outgoing); 395Response.Headers.Append(HeaderNames.WWWAuthenticate, NegotiateVerb);
Microsoft.AspNetCore.Components.WebAssembly.Server (5)
ComponentsWebAssemblyApplicationBuilderExtensions.cs (4)
48context.Response.Headers.Append("Blazor-Environment", webHostEnvironment.EnvironmentName); 55context.Response.Headers.Append("DOTNET-MODIFIABLE-ASSEMBLIES", s_dotnetModifiableAssemblies); 62context.Response.Headers.Append("ASPNETCORE-BROWSER-TOOLS", s_aspnetcoreBrowserTools); 107fileContext.Context.Response.Headers.Append(HeaderNames.CacheControl, "no-cache");
ContentEncodingNegotiator.cs (1)
92context.Response.Headers.Append(HeaderNames.Vary, HeaderNames.ContentEncoding);
Microsoft.AspNetCore.Components.WebAssembly.Server.Tests (9)
ContentEncodingNegotiatorTests.cs (9)
24httpContext.Request.Headers.Append(HeaderNames.AcceptEncoding, encoding); 46httpContext.Request.Headers.Append(HeaderNames.AcceptEncoding, encoding); 67httpContext.Request.Headers.Append(HeaderNames.AcceptEncoding, encoding); 90httpContext.Request.Headers.Append(HeaderNames.AcceptEncoding, encoding); 113httpContext.Request.Headers.Append(HeaderNames.AcceptEncoding, encoding); 136httpContext.Request.Headers.Append(HeaderNames.AcceptEncoding, encoding); 159httpContext.Request.Headers.Append(HeaderNames.AcceptEncoding, encoding); 181httpContext.Request.Headers.Append(HeaderNames.AcceptEncoding, encoding); 202httpContext.Request.Headers.Append(HeaderNames.AcceptEncoding, encoding);
Microsoft.AspNetCore.CookiePolicy.Test (3)
CookieChunkingTests.cs (3)
211context.Request.Headers.Append("Cookie", "TestCookie=chunks-7;TestCookieC1=1;TestCookieC2=2;TestCookieC3=3;TestCookieC4=4;TestCookieC5=5;TestCookieC6=6;TestCookieC7=7"); 233context.Request.Headers.Append("Cookie", "TestCookie=chunks-7;TestCookieC1=1;TestCookieC2=2"); 251context.Request.Headers.Append("Cookie", "TestCookie=chunks-7;TestCookieC1=1;TestCookieC2=2;TestCookieC4=4");
Microsoft.AspNetCore.Cors (1)
Infrastructure\CorsService.cs (1)
205headers.Append(HeaderNames.Vary, "Origin");
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Latency\AddServerTimingHeaderMiddleware.cs (1)
48httpContext.Response.Headers.Append(ServerTimingHeaderName, $"reqlatency;dur={elapsedMs}");
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (3)
Latency\ChecpointAcceptanceTests.cs (1)
92ctx.Response.Headers.Append("Server-Timing", alreadySetServerTimingHeader);
Latency\RequestLatencyTelemetryMiddlewareTests.cs (1)
98httpContextMock.Response.Headers.Append(TelemetryConstants.ServerApplicationNameHeader, "testValue");
Logging\AcceptanceTests.cs (1)
90context.Response.Headers.Append(HeaderNames.TransferEncoding, "chunked");
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (5)
JsonTranscodingServerCallContextTests.cs (5)
40httpContext.Request.Headers.Append("TestName", "TestValue"); 41httpContext.Request.Headers.Append(":method", "GET"); 42httpContext.Request.Headers.Append("grpc-encoding", "identity"); 43httpContext.Request.Headers.Append("grpc-timeout", "1S"); 44httpContext.Request.Headers.Append("hello-bin", Convert.ToBase64String(new byte[] { 1, 2, 3 }));
Microsoft.AspNetCore.Http.Extensions (5)
HeaderDictionaryTypeExtensions.cs (3)
104Headers.Append(name, StringValues.Empty); 107Headers.Append(name, new StringValues(values[0]!.ToString())); 115Headers.Append(name, new StringValues(newValues));
RequestHeaders.cs (1)
411Headers.Append(name, value.ToString());
ResponseHeaders.cs (1)
261Headers.Append(name, value.ToString());
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheKeyProviderTests.cs (1)
171context.HttpContext.Request.Headers.Append("HeaderA", "ValueA");
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Http\HttpProtocol.cs (1)
555RequestTrailers.Append(key, valueStr);
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (22)
Http2\Http2HeadersEnumeratorTests.cs (11)
29responseHeaders.Append("Name1", "Value1"); 30responseHeaders.Append("Name2", "Value2-1"); 31responseHeaders.Append("Name2", "Value2-2"); 32responseHeaders.Append("Name3", "Value3"); 62responseTrailers.Append("Name1", "Value1"); 63responseTrailers.Append("Name2", "Value2-1"); 64responseTrailers.Append("Name2", "Value2-2"); 65responseTrailers.Append("Name3", "Value3"); 112responseTrailers.Append("Name1", "Value1"); 113responseTrailers.Append("Name2", "Value2-1"); 114responseTrailers.Append("Name2", "Value2-2");
Http3\Http3HeadersEnumeratorTests.cs (11)
29responseHeaders.Append("Name1", "Value1"); 30responseHeaders.Append("Name2", "Value2-1"); 31responseHeaders.Append("Name2", "Value2-2"); 32responseHeaders.Append("Name3", "Value3"); 62responseTrailers.Append("Name1", "Value1"); 63responseTrailers.Append("Name2", "Value2-1"); 64responseTrailers.Append("Name2", "Value2-2"); 65responseTrailers.Append("Name3", "Value3"); 115responseTrailers.Append("Name1", "Value1"); 116responseTrailers.Append("Name2", "Value2-1"); 117responseTrailers.Append("Name2", "Value2-2");
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (8)
Http2\Http2HeadersEnumeratorBenchmark.cs (8)
39_unknownSingleValueResponseHeaders.Append("One", "Value"); 40_unknownSingleValueResponseHeaders.Append("Two", "Value"); 41_unknownSingleValueResponseHeaders.Append("Three", "Value"); 42_unknownSingleValueResponseHeaders.Append("Four", "Value"); 45_unknownMultipleValueResponseHeaders.Append("One", new StringValues(new[] { "One", "Two" })); 46_unknownMultipleValueResponseHeaders.Append("Two", new StringValues(new[] { "One", "Two" })); 47_unknownMultipleValueResponseHeaders.Append("Three", new StringValues(new[] { "One", "Two" })); 48_unknownMultipleValueResponseHeaders.Append("Four", new StringValues(new[] { "One", "Two" }));
Microsoft.AspNetCore.TestHost (3)
ClientHandler.cs (3)
147req.Headers.Append(header.Key, header.Value.ToArray()); 162req.Headers.Append(header.Key, string.Join(' ', header.Value)); 166req.Headers.Append(header.Key, header.Value.ToArray());