5 implementations of Trailers
Microsoft.AspNetCore.Server.HttpSys (1)
RequestProcessing\RequestContext.FeatureCollection.cs (1)
609IHeaderDictionary IHttpResponseTrailersFeature.Trailers
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpContext.FeatureCollection.cs (1)
469IHeaderDictionary IHttpResponseTrailersFeature.Trailers
Microsoft.AspNetCore.Server.Kestrel.Core (2)
Internal\Http2\Http2Stream.FeatureCollection.cs (1)
24IHeaderDictionary IHttpResponseTrailersFeature.Trailers
Internal\Http3\Http3Stream.FeatureCollection.cs (1)
19IHeaderDictionary IHttpResponseTrailersFeature.Trailers
Microsoft.AspNetCore.TestHost (1)
ResponseTrailersFeature.cs (1)
11public IHeaderDictionary Trailers { get; set; } = new HeaderDictionary();
2 writes to Trailers
InMemory.FunctionalTests (2)
Http2\Http2ConnectionTests.cs (1)
335trailersFeature.Trailers = trailersFirst;
Http3\Http3ConnectionTests.cs (1)
570trailersFeature.Trailers = trailersFirst;
54 references to Trailers
InMemory.FunctionalTests (49)
Http2\Http2ConnectionTests.cs (3)
334trailersFirst = new ResponseTrailersWrapper(trailersFeature.Trailers); 339trailersLast = trailersFeature.Trailers; 341trailersFeature.Trailers["trailer-" + requestCount] = "true";
Http2\Http2StreamTests.cs (19)
2310var trailers = context.Features.Get<IHttpResponseTrailersFeature>().Trailers; 2473Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.ETag = "Custom 你好 Tag"); 2474Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.Accept = "Custom 你好 Tag"); 2516context.Features.Get<IHttpResponseTrailersFeature>().Trailers.ETag = "Custom 你好 Tag"; 2517context.Features.Get<IHttpResponseTrailersFeature>().Trailers.Accept = "Custom 你好 Accept"; 4748Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 4804Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 4872Assert.False(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 4926Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 4988Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 5047Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 5168Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 5242Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 5318Assert.False(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 5389Assert.False(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 5457Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 5539Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 5621Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 5705Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly);
Http3\Http3ConnectionTests.cs (3)
569trailersFirst = new ResponseTrailersWrapper(trailersFeature.Trailers); 574trailersLast = trailersFeature.Trailers; 576trailersFeature.Trailers[$"trailer-{requestCount++}"] = "true";
Http3\Http3StreamTests.cs (24)
832trailersFeature.Trailers.Add("Trailer1", "Value1"); 833trailersFeature.Trailers.Add("Trailer2", "Value2"); 956trailersFeature.Trailers.Add("Trailer1", "Value1"); 957trailersFeature.Trailers.Add("Trailer2", "Value2"); 988trailersFeature.Trailers.Add("Trailer1", "Value1"); 989trailersFeature.Trailers.Add("Trailer2", "Value2"); 1017Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.ETag = "Custom 你好 Tag"); 1018Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.Accept = "Custom 你好 Tag"); 1048context.Features.Get<IHttpResponseTrailersFeature>().Trailers.ETag = "Custom 你好 Tag"; 1049context.Features.Get<IHttpResponseTrailersFeature>().Trailers.Accept = "Custom 你好 Accept"; 1144Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1193Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1247Assert.False(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1294Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1343Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1395Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1495Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1550Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1607Assert.False(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1665Assert.False(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1720Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1781Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1843Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly); 1908Assert.True(context.Features.Get<IHttpResponseTrailersFeature>().Trailers.IsReadOnly);
Interop.FunctionalTests (2)
Http3\Http3RequestTests.cs (2)
1348feature.Trailers.Append($"trailer-{i}", new string('!', i)); 1351Logger.LogInformation($"Server trailer count: {feature.Trailers.Count}");
Microsoft.AspNetCore.HttpLogging (1)
HttpLoggingFields.cs (1)
119/// Flag for logging the HTTP Response <see cref="IHttpResponseTrailersFeature.Trailers"/>.
Microsoft.AspNetCore.TestHost (2)
ClientHandler.cs (2)
200if (responseTrailersFeature?.Trailers != null) 202foreach (var trailer in responseTrailersFeature.Trailers)