16 implementations of IHeaderDictionary
InMemory.FunctionalTests (2)
Http2\Http2ConnectionTests.cs (1)
284private class ResponseTrailersWrapper : IHeaderDictionary
Http3\Http3ConnectionTests.cs (1)
819private class ResponseTrailersWrapper : IHeaderDictionary
Microsoft.AspNetCore.Hosting.Tests (1)
WebHostTests.cs (1)
1368private class StubFeatures : IHttpRequestFeature, IHttpResponseFeature, IHeaderDictionary
Microsoft.AspNetCore.Http (1)
HeaderDictionary.cs (1)
18public class HeaderDictionary : IHeaderDictionary
Microsoft.AspNetCore.Owin (1)
DictionaryStringValuesWrapper.cs (1)
12internal sealed class DictionaryStringValuesWrapper : IHeaderDictionary
Microsoft.AspNetCore.Server.HttpSys (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
16internal sealed class HeaderCollection : IHeaderDictionary
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
16internal sealed partial class RequestHeaders : IHeaderDictionary
Microsoft.AspNetCore.Server.IIS (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
16internal sealed class HeaderCollection : IHeaderDictionary
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
16internal sealed partial class RequestHeaders : IHeaderDictionary
Microsoft.AspNetCore.Server.Kestrel.Core (4)
Internal\Http\HttpHeaders.cs (1)
20internal abstract partial class HttpHeaders : IHeaderDictionary
Internal\Http\HttpHeaders.Generated.cs (3)
378internal partial class HttpRequestHeaders : IHeaderDictionary 8686internal partial class HttpResponseHeaders : IHeaderDictionary 15522internal partial class HttpResponseTrailers : IHeaderDictionary
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Http1\Http1ConnectionTests.cs (1)
1189private class RequestHeadersWrapper : IHeaderDictionary
Microsoft.AspNetCore.Shared.Tests (2)
src\Shared\HttpSys\RequestProcessing\HeaderCollection.cs (1)
16internal sealed class HeaderCollection : IHeaderDictionary
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
16internal sealed partial class RequestHeaders : IHeaderDictionary
564 references to IHeaderDictionary
InMemory.FunctionalTests (14)
Http2\Http2ConnectionTests.cs (4)
286readonly IHeaderDictionary _innerHeaders; 288public ResponseTrailersWrapper(IHeaderDictionary headers) 325IHeaderDictionary trailersFirst = null; 326IHeaderDictionary trailersLast = null;
Http2\Http2StreamTests.cs (1)
2310var trailers = context.Features.Get<IHttpResponseTrailersFeature>().Trailers;
Http2\Http2TestBase.cs (1)
227var trailers = context.Features.Get<IHttpRequestTrailersFeature>().Trailers;
Http3\Http3ConnectionTests.cs (4)
562IHeaderDictionary trailersFirst = null; 563IHeaderDictionary trailersLast = null; 821readonly IHeaderDictionary _innerHeaders; 823public ResponseTrailersWrapper(IHeaderDictionary headers)
RequestTests.cs (3)
1303IHeaderDictionary originalRequestHeaders = null; 1393IHeaderDictionary lastRequestHeaders = null; 1394IHeaderDictionary lastResponseHeaders = null;
ResponseTests.cs (1)
2882IHeaderDictionary originalResponseHeaders = null;
Microsoft.AspNetCore.Antiforgery (1)
Internal\DefaultAntiforgery.cs (1)
364var responseHeaders = httpContext.Response.Headers;
Microsoft.AspNetCore.App.Analyzers.Test (2)
Http\HeaderDictionaryIndexerAnalyzerTests.cs (1)
163var headerDictionaryPropertyNames = typeof(IHeaderDictionary)
Verifiers\CSharpAnalyzerVerifier.cs (1)
86TrimAssemblyExtension(typeof(Microsoft.AspNetCore.Http.IHeaderDictionary).Assembly.Location),
Microsoft.AspNetCore.Authentication.Cookies (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
274var responseHeaders = context.Response.Headers;
Microsoft.AspNetCore.Components.Server (1)
Builder\ServerRazorComponentsEndpointConventionBuilderExtensions.cs (1)
58var headers = context.Response.Headers;
Microsoft.AspNetCore.CookiePolicy.Test (1)
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
274var responseHeaders = context.Response.Headers;
Microsoft.AspNetCore.Cors (3)
Infrastructure\CorsService.cs (3)
68var requestHeaders = context.Request.Headers; 99var headers = context.Request.Headers; 164var headers = response.Headers;
Microsoft.AspNetCore.Diagnostics (3)
DeveloperExceptionPage\DeveloperExceptionPageMiddlewareImpl.cs (2)
394public ExceptionExtensionData(string details, IHeaderDictionary headers, string path, string? endpoint, RouteValueDictionary? routeValues) 404public IHeaderDictionary Headers { get; }
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
255var headers = ((HttpResponse)state).Headers;
Microsoft.AspNetCore.Diagnostics.HealthChecks (1)
HealthCheckMiddleware.cs (1)
64var headers = httpContext.Response.Headers;
Microsoft.AspNetCore.Diagnostics.Middleware (1)
Logging\HeaderReader.cs (1)
29public void Read(IHeaderDictionary headers, IList<KeyValuePair<string, object?>> logContext)
Microsoft.AspNetCore.Hosting (3)
Internal\HostingApplicationDiagnostics.cs (3)
392var headers = httpContext.Request.Headers; 400var headers = (IHeaderDictionary)carrier!;
Microsoft.AspNetCore.Hosting.Tests (1)
WebHostTests.cs (1)
1390public IHeaderDictionary Headers { get; set; }
Microsoft.AspNetCore.Http (7)
Features\HttpRequestFeature.cs (1)
49public IHeaderDictionary Headers { get; set; }
Features\HttpResponseFeature.cs (1)
28public IHeaderDictionary Headers { get; set; }
Features\RequestCookiesFeature.cs (1)
60var headers = HttpRequestFeature.Headers;
FormFile.cs (1)
55public IHeaderDictionary Headers { get; set; } = default!;
Internal\DefaultHttpRequest.cs (1)
133public override IHeaderDictionary Headers
Internal\DefaultHttpResponse.cs (1)
62public override IHeaderDictionary Headers
Internal\ResponseCookies.cs (1)
29private IHeaderDictionary Headers { get; set; }
Microsoft.AspNetCore.Http.Abstractions (21)
Extensions\HeaderDictionaryExtensions.cs (9)
9/// Contains extension methods for modifying an <see cref="IHeaderDictionary"/> instance. 16/// <param name="headers">The <see cref="IHeaderDictionary"/> to use.</param> 19public static void Append(this IHeaderDictionary headers, string key, StringValues value) 27/// <param name="headers">The <see cref="IHeaderDictionary"/> to use.</param> 30public static void AppendCommaSeparatedValues(this IHeaderDictionary headers, string key, params string[] values) 39/// <param name="headers">The <see cref="IHeaderDictionary"/> to use.</param> 42public static string[] GetCommaSeparatedValues(this IHeaderDictionary headers, string key) 53/// <param name="headers">The <see cref="IHeaderDictionary"/> to use.</param> 56public static void SetCommaSeparatedValues(this IHeaderDictionary headers, string key, params string[] values)
HttpRequest.cs (2)
87public abstract IHeaderDictionary Headers { get; } 173public IHeaderDictionary Headers => _request.Headers;
HttpResponse.cs (3)
47public abstract IHeaderDictionary Headers { get; } 168public IHeaderDictionary Headers => _response.Headers; 169public IHeaderDictionary? Trailers
Internal\ParsingHelpers.cs (7)
11public static StringValues GetHeader(IHeaderDictionary headers, string key) 17public static string[] GetHeaderSplit(IHeaderDictionary headers, string key) 41public static StringValues GetHeaderUnmodified(IHeaderDictionary headers, string key) 49public static void SetHeaderJoined(IHeaderDictionary headers, string key, StringValues value) 87public static void SetHeaderUnmodified(IHeaderDictionary headers, string key, StringValues? values) 102public static void AppendHeaderJoined(IHeaderDictionary headers, string key, params string[] values) 123public static void AppendHeaderUnmodified(IHeaderDictionary headers, string key, StringValues values)
Microsoft.AspNetCore.Http.Extensions (14)
HeaderDictionaryTypeExtensions.cs (9)
42internal static DateTimeOffset? GetDate(this IHeaderDictionary headers, string name) 50internal static void Set(this IHeaderDictionary headers, string name, object? value) 65internal static void SetList<T>(this IHeaderDictionary headers, string name, IList<T>? values) 90/// Appends a sequence of values to <see cref="IHeaderDictionary"/>. 93/// <param name="Headers">The <see cref="IHeaderDictionary"/>.</param> 96public static void AppendList<T>(this IHeaderDictionary Headers, string name, IList<T> values) 120internal static void SetDate(this IHeaderDictionary headers, string name, DateTimeOffset? value) 168internal static T? Get<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] T>(this IHeaderDictionary headers, string name) 220internal static IList<T> GetList<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicMethods)] T>(this IHeaderDictionary headers, string name)
RequestDelegateFactory.cs (1)
69private static readonly PropertyInfo HeaderIndexerProperty = typeof(IHeaderDictionary).GetProperty("Item")!;
RequestHeaders.cs (2)
19public RequestHeaders(IHeaderDictionary headers) 29public IHeaderDictionary Headers { get; }
ResponseHeaders.cs (2)
19public ResponseHeaders(IHeaderDictionary headers) 29public IHeaderDictionary Headers { get; }
Microsoft.AspNetCore.Http.Extensions.Tests (2)
RequestDelegateFactoryTests.cs (1)
3716public IHeaderDictionary Headers { get; set; } = new HeaderDictionary();
ResponseExtensionTests.cs (1)
57public IHeaderDictionary Headers { get; set; }
Microsoft.AspNetCore.Http.Features (5)
IFormFile.cs (1)
24IHeaderDictionary Headers { get; }
IHttpRequestFeature.cs (1)
82IHeaderDictionary Headers { get; set; }
IHttpRequestTrailersFeature.cs (1)
22IHeaderDictionary Trailers { get; }
IHttpResponseFeature.cs (1)
25IHeaderDictionary Headers { get; set; }
IHttpResponseTrailersFeature.cs (1)
18IHeaderDictionary Trailers { get; set; }
Microsoft.AspNetCore.Http.Tests (27)
ApplicationBuilderTests.cs (1)
180public IHeaderDictionary Headers { get; set; }
DefaultHttpContextTests.cs (1)
432public IHeaderDictionary Headers { get; set; } = new HeaderDictionary();
HeaderDictionaryTests.cs (1)
128IHeaderDictionary asIHeaderDictionary = emptyHeaders;
Internal\DefaultHttpRequestTests.cs (1)
346private static HttpRequest CreateRequest(IHeaderDictionary headers)
Internal\DefaultHttpResponseTests.cs (2)
196public IHeaderDictionary Headers { get; set; } 238private static HttpResponse CreateResponse(IHeaderDictionary headers)
ResponseCookiesTest.cs (21)
13private IFeatureCollection MakeFeatures(IHeaderDictionary headers) 27var headers = (IHeaderDictionary)new HeaderDictionary(); 60var headers = (IHeaderDictionary)new HeaderDictionary(); 81var headers = (IHeaderDictionary)new HeaderDictionary(); 103var headers = (IHeaderDictionary)new HeaderDictionary(); 120var headers = (IHeaderDictionary)new HeaderDictionary(); 150var headers = (IHeaderDictionary)new HeaderDictionary(); 178var headers = (IHeaderDictionary)new HeaderDictionary(); 210var headers = (IHeaderDictionary)new HeaderDictionary(); 228var headers = (IHeaderDictionary)new HeaderDictionary(); 250var headers = (IHeaderDictionary)new HeaderDictionary();
Microsoft.AspNetCore.HttpLogging (1)
HttpLoggingMiddleware.cs (1)
351IHeaderDictionary headers,
Microsoft.AspNetCore.HttpOverrides (1)
ForwardedHeadersMiddleware.cs (1)
128var requestHeaders = context.Request.Headers;
Microsoft.AspNetCore.Localization (1)
RequestLocalizationMiddleware.cs (1)
116var headers = context.Response.Headers;
Microsoft.AspNetCore.Mvc.Core (2)
Filters\ResponseCacheFilterExecutor.cs (1)
69var headers = context.HttpContext.Response.Headers;
src\Shared\ChunkingCookieManager\ChunkingCookieManager.cs (1)
274var responseHeaders = context.Response.Headers;
Microsoft.AspNetCore.Mvc.Cors.Test (1)
CorsAuthorizationFilterTest.cs (1)
195var headers = response1.Headers;
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
XmlDataContractSerializerInputFormatterTest.cs (1)
739var headers = new Mock<IHeaderDictionary>();
XmlSerializerInputFormatterTest.cs (1)
675var headers = new Mock<IHeaderDictionary>();
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (1)
NewtonsoftJsonPatchInputFormatterTest.cs (1)
259var headers = new Mock<IHeaderDictionary>();
Microsoft.AspNetCore.Mvc.TagHelpers (1)
Cache\CacheTagKey.cs (1)
22private static readonly Func<IHeaderDictionary, string, string> HeaderAccessor = (c, key) => c[key];
Microsoft.AspNetCore.Mvc.TagHelpers.Test (1)
CacheTagKeyTest.cs (1)
237var headers = cacheTagHelper.ViewContext.HttpContext.Request.Headers;
Microsoft.AspNetCore.OutputCaching (2)
OutputCacheEntry.cs (2)
81internal OutputCacheEntry CopyHeadersFrom(IHeaderDictionary headers) 112public void CopyHeadersTo(IHeaderDictionary headers)
Microsoft.AspNetCore.OutputCaching.Microbenchmarks (1)
EndToEndBenchmarks.cs (1)
30private static IHeaderDictionary _headers = null!;
Microsoft.AspNetCore.Owin (7)
DictionaryStringArrayWrapper.cs (2)
13public DictionaryStringArrayWrapper(IHeaderDictionary inner) 18public readonly IHeaderDictionary Inner;
DictionaryStringValuesWrapper.cs (1)
27StringValues IHeaderDictionary.this[string key]
OwinFeatureCollection.cs (2)
117IHeaderDictionary IHttpRequestFeature.Headers 147IHeaderDictionary IHttpResponseFeature.Headers
Utilities.cs (2)
46internal static IHeaderDictionary MakeHeaderDictionary(IDictionary<string, string[]> dictionary) 56internal static IDictionary<string, string[]> MakeDictionaryStringArray(IHeaderDictionary dictionary)
Microsoft.AspNetCore.ResponseCaching (7)
CacheEntry\CachedResponse.cs (1)
14public IHeaderDictionary Headers { get; set; } = default!;
MemoryCachedResponse.cs (1)
14public IHeaderDictionary Headers { get; set; } = new HeaderDictionary();
ResponseCachingContext.cs (1)
55internal IHeaderDictionary CachedResponseHeaders { get; set; }
ResponseCachingKeyProvider.cs (1)
106var requestHeaders = context.HttpContext.Request.Headers;
ResponseCachingMiddleware.cs (2)
255var headers = response.Headers; 430var cachedResponseHeaders = context.CachedResponseHeaders;
ResponseCachingPolicyProvider.cs (1)
35var requestHeaders = context.HttpContext.Request.Headers;
Microsoft.AspNetCore.ResponseCompression (1)
ResponseCompressionBody.cs (1)
206var headers = _context.Response.Headers;
Microsoft.AspNetCore.Routing (2)
Matching\HttpMethodMatcherPolicy.cs (2)
116var headers = httpContext.Request.Headers; 422var headers = httpContext.Request.Headers;
Microsoft.AspNetCore.Server.HttpSys (8)
RequestProcessing\Request.cs (1)
519IHeaderDictionary headerDictionary = Headers;
RequestProcessing\RequestContext.FeatureCollection.cs (6)
45private IHeaderDictionary _requestHeaders = default!; 65private IHeaderDictionary _responseHeaders = default!; 66private IHeaderDictionary? _responseTrailers; 174IHeaderDictionary IHttpRequestFeature.Headers 445IHeaderDictionary IHttpResponseFeature.Headers 609IHeaderDictionary IHttpResponseTrailersFeature.Trailers
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
174long? IHeaderDictionary.ContentLength
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (18)
RequestHeaderTests.cs (9)
24var requestHeaders = httpContext.Request.Headers; 43var requestHeaders = httpContext.Request.Headers; 89var requestHeaders = httpContext.Request.Headers; 108var requestHeaders = httpContext.Request.Headers; 131var requestHeaders = httpContext.Request.Headers; 154var requestHeaders = httpContext.Request.Headers; 186var requestHeaders = httpContext.Request.Headers; 213var requestHeaders = httpContext.Request.Headers; 252private async Task<string> SendRequestAsync(string address, IHeaderDictionary headers)
ResponseHeaderTests.cs (9)
47var responseHeaders = responseInfo.Headers; 73var responseHeaders = responseInfo.Headers; 98var responseHeaders = responseInfo.Headers; 123var responseHeaders = responseInfo.Headers; 144var responseHeaders = responseInfo.Headers; 191var responseHeaders = response.Headers; 221var responseHeaders = response.Headers; 252var responseHeaders = response.Headers; 281var responseHeaders = httpContext.Response.Headers;
Microsoft.AspNetCore.Server.IIS (7)
Core\IISHttpContext.cs (3)
130public IHeaderDictionary RequestHeaders { get; set; } = default!; 131public IHeaderDictionary ResponseHeaders { get; set; } = default!; 132public IHeaderDictionary? ResponseTrailers { get; set; }
Core\IISHttpContext.FeatureCollection.cs (3)
149IHeaderDictionary IHttpRequestFeature.Headers 175IHeaderDictionary IHttpResponseFeature.Headers 469IHeaderDictionary IHttpResponseTrailersFeature.Trailers
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
174long? IHeaderDictionary.ContentLength
Microsoft.AspNetCore.Server.Kestrel.Core (282)
Internal\Http\Http1MessageBody.cs (1)
184IHeaderDictionary headerDictionary = headers;
Internal\Http\HttpHeaders.cs (2)
47StringValues IHeaderDictionary.this[string key] 91((IHeaderDictionary)this)[key] = value;
Internal\Http\HttpHeaders.Generated.cs (267)
596StringValues IHeaderDictionary.Accept 624StringValues IHeaderDictionary.Connection 652StringValues IHeaderDictionary.Host 680StringValues IHeaderDictionary.UserAgent 708StringValues IHeaderDictionary.AcceptCharset 736StringValues IHeaderDictionary.AcceptEncoding 764StringValues IHeaderDictionary.AcceptLanguage 792StringValues IHeaderDictionary.AccessControlRequestHeaders 820StringValues IHeaderDictionary.AccessControlRequestMethod 848StringValues IHeaderDictionary.Authorization 876StringValues IHeaderDictionary.Baggage 904StringValues IHeaderDictionary.CacheControl 932StringValues IHeaderDictionary.ContentType 960StringValues IHeaderDictionary.Cookie 988StringValues IHeaderDictionary.CorrelationContext 1016StringValues IHeaderDictionary.Date 1044StringValues IHeaderDictionary.Expect 1072StringValues IHeaderDictionary.From 1100StringValues IHeaderDictionary.GrpcAcceptEncoding 1128StringValues IHeaderDictionary.GrpcEncoding 1156StringValues IHeaderDictionary.GrpcTimeout 1184StringValues IHeaderDictionary.IfMatch 1212StringValues IHeaderDictionary.IfModifiedSince 1240StringValues IHeaderDictionary.IfNoneMatch 1268StringValues IHeaderDictionary.IfRange 1296StringValues IHeaderDictionary.IfUnmodifiedSince 1324StringValues IHeaderDictionary.KeepAlive 1352StringValues IHeaderDictionary.MaxForwards 1380StringValues IHeaderDictionary.Origin 1408StringValues IHeaderDictionary.Pragma 1436StringValues IHeaderDictionary.ProxyAuthorization 1464StringValues IHeaderDictionary.Range 1492StringValues IHeaderDictionary.Referer 1520StringValues IHeaderDictionary.RequestId 1548StringValues IHeaderDictionary.TE 1576StringValues IHeaderDictionary.TraceParent 1604StringValues IHeaderDictionary.TraceState 1632StringValues IHeaderDictionary.TransferEncoding 1660StringValues IHeaderDictionary.Translate 1688StringValues IHeaderDictionary.Upgrade 1716StringValues IHeaderDictionary.UpgradeInsecureRequests 1744StringValues IHeaderDictionary.Via 1772StringValues IHeaderDictionary.Warning 1801StringValues IHeaderDictionary.AcceptRanges 1818StringValues IHeaderDictionary.AccessControlAllowCredentials 1835StringValues IHeaderDictionary.AccessControlAllowHeaders 1852StringValues IHeaderDictionary.AccessControlAllowMethods 1869StringValues IHeaderDictionary.AccessControlAllowOrigin 1886StringValues IHeaderDictionary.AccessControlExposeHeaders 1903StringValues IHeaderDictionary.AccessControlMaxAge 1920StringValues IHeaderDictionary.Age 1937StringValues IHeaderDictionary.Allow 1954StringValues IHeaderDictionary.AltSvc 1971StringValues IHeaderDictionary.ContentDisposition 1988StringValues IHeaderDictionary.ContentEncoding 2005StringValues IHeaderDictionary.ContentLanguage 2022StringValues IHeaderDictionary.ContentLocation 2039StringValues IHeaderDictionary.ContentMD5 2056StringValues IHeaderDictionary.ContentRange 2073StringValues IHeaderDictionary.ContentSecurityPolicy 2090StringValues IHeaderDictionary.ContentSecurityPolicyReportOnly 2107StringValues IHeaderDictionary.ETag 2124StringValues IHeaderDictionary.Expires 2141StringValues IHeaderDictionary.GrpcMessage 2158StringValues IHeaderDictionary.GrpcStatus 2175StringValues IHeaderDictionary.LastModified 2192StringValues IHeaderDictionary.Link 2209StringValues IHeaderDictionary.Location 2226StringValues IHeaderDictionary.ProxyAuthenticate 2243StringValues IHeaderDictionary.ProxyConnection 2260StringValues IHeaderDictionary.RetryAfter 2277StringValues IHeaderDictionary.SecWebSocketAccept 2294StringValues IHeaderDictionary.SecWebSocketKey 2311StringValues IHeaderDictionary.SecWebSocketProtocol 2328StringValues IHeaderDictionary.SecWebSocketVersion 2345StringValues IHeaderDictionary.SecWebSocketExtensions 2362StringValues IHeaderDictionary.Server 2379StringValues IHeaderDictionary.SetCookie 2396StringValues IHeaderDictionary.StrictTransportSecurity 2413StringValues IHeaderDictionary.Trailer 2430StringValues IHeaderDictionary.Vary 2447StringValues IHeaderDictionary.WebSocketSubProtocols 2464StringValues IHeaderDictionary.WWWAuthenticate 2481StringValues IHeaderDictionary.XContentTypeOptions 2498StringValues IHeaderDictionary.XFrameOptions 2515StringValues IHeaderDictionary.XPoweredBy 2532StringValues IHeaderDictionary.XRequestedWith 2549StringValues IHeaderDictionary.XUACompatible 2566StringValues IHeaderDictionary.XXSSProtection 8813StringValues IHeaderDictionary.Connection 8843StringValues IHeaderDictionary.ContentType 8872StringValues IHeaderDictionary.Date 8902StringValues IHeaderDictionary.Server 8932StringValues IHeaderDictionary.AcceptRanges 8961StringValues IHeaderDictionary.AccessControlAllowCredentials 8990StringValues IHeaderDictionary.AccessControlAllowHeaders 9019StringValues IHeaderDictionary.AccessControlAllowMethods 9048StringValues IHeaderDictionary.AccessControlAllowOrigin 9077StringValues IHeaderDictionary.AccessControlExposeHeaders 9106StringValues IHeaderDictionary.AccessControlMaxAge 9135StringValues IHeaderDictionary.Age 9164StringValues IHeaderDictionary.Allow 9193StringValues IHeaderDictionary.AltSvc 9223StringValues IHeaderDictionary.CacheControl 9252StringValues IHeaderDictionary.ContentEncoding 9281StringValues IHeaderDictionary.ContentLanguage 9310StringValues IHeaderDictionary.ContentLocation 9339StringValues IHeaderDictionary.ContentMD5 9368StringValues IHeaderDictionary.ContentRange 9397StringValues IHeaderDictionary.ETag 9426StringValues IHeaderDictionary.Expires 9455StringValues IHeaderDictionary.GrpcEncoding 9484StringValues IHeaderDictionary.KeepAlive 9513StringValues IHeaderDictionary.LastModified 9542StringValues IHeaderDictionary.Location 9571StringValues IHeaderDictionary.Pragma 9600StringValues IHeaderDictionary.ProxyAuthenticate 9629StringValues IHeaderDictionary.ProxyConnection 9658StringValues IHeaderDictionary.RetryAfter 9687StringValues IHeaderDictionary.SetCookie 9716StringValues IHeaderDictionary.Trailer 9745StringValues IHeaderDictionary.TransferEncoding 9775StringValues IHeaderDictionary.Upgrade 9804StringValues IHeaderDictionary.Vary 9833StringValues IHeaderDictionary.Via 9862StringValues IHeaderDictionary.Warning 9891StringValues IHeaderDictionary.WWWAuthenticate 9921StringValues IHeaderDictionary.Accept 9939StringValues IHeaderDictionary.AcceptCharset 9957StringValues IHeaderDictionary.AcceptEncoding 9975StringValues IHeaderDictionary.AcceptLanguage 9993StringValues IHeaderDictionary.AccessControlRequestHeaders 10011StringValues IHeaderDictionary.AccessControlRequestMethod 10029StringValues IHeaderDictionary.Authorization 10047StringValues IHeaderDictionary.Baggage 10065StringValues IHeaderDictionary.ContentDisposition 10083StringValues IHeaderDictionary.ContentSecurityPolicy 10101StringValues IHeaderDictionary.ContentSecurityPolicyReportOnly 10119StringValues IHeaderDictionary.CorrelationContext 10137StringValues IHeaderDictionary.Cookie 10155StringValues IHeaderDictionary.Expect 10173StringValues IHeaderDictionary.From 10191StringValues IHeaderDictionary.GrpcAcceptEncoding 10209StringValues IHeaderDictionary.GrpcMessage 10227StringValues IHeaderDictionary.GrpcStatus 10245StringValues IHeaderDictionary.GrpcTimeout 10263StringValues IHeaderDictionary.Host 10281StringValues IHeaderDictionary.IfMatch 10299StringValues IHeaderDictionary.IfModifiedSince 10317StringValues IHeaderDictionary.IfNoneMatch 10335StringValues IHeaderDictionary.IfRange 10353StringValues IHeaderDictionary.IfUnmodifiedSince 10371StringValues IHeaderDictionary.Link 10389StringValues IHeaderDictionary.MaxForwards 10407StringValues IHeaderDictionary.Origin 10425StringValues IHeaderDictionary.ProxyAuthorization 10443StringValues IHeaderDictionary.Range 10461StringValues IHeaderDictionary.Referer 10479StringValues IHeaderDictionary.RequestId 10497StringValues IHeaderDictionary.SecWebSocketAccept 10515StringValues IHeaderDictionary.SecWebSocketKey 10533StringValues IHeaderDictionary.SecWebSocketProtocol 10551StringValues IHeaderDictionary.SecWebSocketVersion 10569StringValues IHeaderDictionary.SecWebSocketExtensions 10587StringValues IHeaderDictionary.StrictTransportSecurity 10605StringValues IHeaderDictionary.TE 10623StringValues IHeaderDictionary.Translate 10641StringValues IHeaderDictionary.TraceParent 10659StringValues IHeaderDictionary.TraceState 10677StringValues IHeaderDictionary.UpgradeInsecureRequests 10695StringValues IHeaderDictionary.UserAgent 10713StringValues IHeaderDictionary.WebSocketSubProtocols 10731StringValues IHeaderDictionary.XContentTypeOptions 10749StringValues IHeaderDictionary.XFrameOptions 10767StringValues IHeaderDictionary.XPoweredBy 10785StringValues IHeaderDictionary.XRequestedWith 10803StringValues IHeaderDictionary.XUACompatible 10821StringValues IHeaderDictionary.XXSSProtection 15530StringValues IHeaderDictionary.ETag 15559StringValues IHeaderDictionary.GrpcMessage 15588StringValues IHeaderDictionary.GrpcStatus 15618StringValues IHeaderDictionary.Accept 15636StringValues IHeaderDictionary.AcceptCharset 15654StringValues IHeaderDictionary.AcceptEncoding 15672StringValues IHeaderDictionary.AcceptLanguage 15690StringValues IHeaderDictionary.AcceptRanges 15708StringValues IHeaderDictionary.AccessControlAllowCredentials 15726StringValues IHeaderDictionary.AccessControlAllowHeaders 15744StringValues IHeaderDictionary.AccessControlAllowMethods 15762StringValues IHeaderDictionary.AccessControlAllowOrigin 15780StringValues IHeaderDictionary.AccessControlExposeHeaders 15798StringValues IHeaderDictionary.AccessControlMaxAge 15816StringValues IHeaderDictionary.AccessControlRequestHeaders 15834StringValues IHeaderDictionary.AccessControlRequestMethod 15852StringValues IHeaderDictionary.Age 15870StringValues IHeaderDictionary.Allow 15888StringValues IHeaderDictionary.AltSvc 15906StringValues IHeaderDictionary.Authorization 15924StringValues IHeaderDictionary.Baggage 15942StringValues IHeaderDictionary.CacheControl 15960StringValues IHeaderDictionary.Connection 15978StringValues IHeaderDictionary.ContentDisposition 15996StringValues IHeaderDictionary.ContentEncoding 16014StringValues IHeaderDictionary.ContentLanguage 16032StringValues IHeaderDictionary.ContentLocation 16050StringValues IHeaderDictionary.ContentMD5 16068StringValues IHeaderDictionary.ContentRange 16086StringValues IHeaderDictionary.ContentSecurityPolicy 16104StringValues IHeaderDictionary.ContentSecurityPolicyReportOnly 16122StringValues IHeaderDictionary.ContentType 16140StringValues IHeaderDictionary.CorrelationContext 16158StringValues IHeaderDictionary.Cookie 16176StringValues IHeaderDictionary.Date 16194StringValues IHeaderDictionary.Expires 16212StringValues IHeaderDictionary.Expect 16230StringValues IHeaderDictionary.From 16248StringValues IHeaderDictionary.GrpcAcceptEncoding 16266StringValues IHeaderDictionary.GrpcEncoding 16284StringValues IHeaderDictionary.GrpcTimeout 16302StringValues IHeaderDictionary.Host 16320StringValues IHeaderDictionary.KeepAlive 16338StringValues IHeaderDictionary.IfMatch 16356StringValues IHeaderDictionary.IfModifiedSince 16374StringValues IHeaderDictionary.IfNoneMatch 16392StringValues IHeaderDictionary.IfRange 16410StringValues IHeaderDictionary.IfUnmodifiedSince 16428StringValues IHeaderDictionary.LastModified 16446StringValues IHeaderDictionary.Link 16464StringValues IHeaderDictionary.Location 16482StringValues IHeaderDictionary.MaxForwards 16500StringValues IHeaderDictionary.Origin 16518StringValues IHeaderDictionary.Pragma 16536StringValues IHeaderDictionary.ProxyAuthenticate 16554StringValues IHeaderDictionary.ProxyAuthorization 16572StringValues IHeaderDictionary.ProxyConnection 16590StringValues IHeaderDictionary.Range 16608StringValues IHeaderDictionary.Referer 16626StringValues IHeaderDictionary.RetryAfter 16644StringValues IHeaderDictionary.RequestId 16662StringValues IHeaderDictionary.SecWebSocketAccept 16680StringValues IHeaderDictionary.SecWebSocketKey 16698StringValues IHeaderDictionary.SecWebSocketProtocol 16716StringValues IHeaderDictionary.SecWebSocketVersion 16734StringValues IHeaderDictionary.SecWebSocketExtensions 16752StringValues IHeaderDictionary.Server 16770StringValues IHeaderDictionary.SetCookie 16788StringValues IHeaderDictionary.StrictTransportSecurity 16806StringValues IHeaderDictionary.TE 16824StringValues IHeaderDictionary.Trailer 16842StringValues IHeaderDictionary.TransferEncoding 16860StringValues IHeaderDictionary.Translate 16878StringValues IHeaderDictionary.TraceParent 16896StringValues IHeaderDictionary.TraceState 16914StringValues IHeaderDictionary.Upgrade 16932StringValues IHeaderDictionary.UpgradeInsecureRequests 16950StringValues IHeaderDictionary.UserAgent 16968StringValues IHeaderDictionary.Vary 16986StringValues IHeaderDictionary.Via 17004StringValues IHeaderDictionary.Warning 17022StringValues IHeaderDictionary.WebSocketSubProtocols 17040StringValues IHeaderDictionary.WWWAuthenticate 17058StringValues IHeaderDictionary.XContentTypeOptions 17076StringValues IHeaderDictionary.XFrameOptions 17094StringValues IHeaderDictionary.XPoweredBy 17112StringValues IHeaderDictionary.XRequestedWith 17130StringValues IHeaderDictionary.XUACompatible 17148StringValues IHeaderDictionary.XXSSProtection
Internal\Http\HttpProtocol.cs (4)
234public IHeaderDictionary RequestHeaders { get; set; } = default!; 235public IHeaderDictionary RequestTrailers { get; } = new HeaderDictionary(); 273public IHeaderDictionary ResponseHeaders { get; set; } = default!; 943((IHeaderDictionary)HttpRequestHeaders).TryGetValue(HeaderNames.Expect, out var expect) &&
Internal\Http\HttpProtocol.FeatureCollection.cs (3)
76IHeaderDictionary IHttpRequestFeature.Headers 112IHeaderDictionary IHttpRequestTrailersFeature.Trailers 136IHeaderDictionary IHttpResponseFeature.Headers
Internal\Http2\Http2Stream.FeatureCollection.cs (2)
19private IHeaderDictionary? _userTrailers; 24IHeaderDictionary IHttpResponseTrailersFeature.Trailers
Internal\Http3\Http3Stream.cs (1)
855if (((AspNetCore.Http.IHeaderDictionary)HttpRequestHeaders).TryGetValue(WebTransportSession.CurrentSupportedVersion, out var version) && string.Equals(version, WebTransportSession.VersionEnabledIndicator, StringComparison.Ordinal))
Internal\Http3\Http3Stream.FeatureCollection.cs (2)
17private IHeaderDictionary? _userTrailers; 19IHeaderDictionary IHttpResponseTrailersFeature.Trailers
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (70)
Http1\Http1ConnectionTests.cs (2)
1191readonly IHeaderDictionary _innerHeaders; 1193public RequestHeadersWrapper(IHeaderDictionary headers)
Http2\Http2HeadersEnumeratorTests.cs (6)
21var responseHeaders = (IHeaderDictionary)new HttpResponseHeaders(); 57var responseTrailers = (IHeaderDictionary)new HttpResponseTrailers(); 108var responseTrailers = (IHeaderDictionary)new HttpResponseTrailers();
Http2\Http2HPackEncoderTests.cs (10)
41var headers = (IHeaderDictionary)new HttpResponseHeaders(); 65var headers = (IHeaderDictionary)new HttpResponseHeaders(); 209var headers = (IHeaderDictionary)new HttpResponseHeaders(_ => Encoding.UTF8); 604IHeaderDictionary headers = new HttpResponseHeaders(); 619IHeaderDictionary headers = new HttpResponseHeaders(); 634IHeaderDictionary headers = new HttpResponseHeaders(); 649IHeaderDictionary headers = new HttpResponseHeaders();
Http3\Http3HeadersEnumeratorTests.cs (6)
21var responseHeaders = (IHeaderDictionary)new HttpResponseHeaders(); 57var responseTrailers = (IHeaderDictionary)new HttpResponseTrailers(); 111var responseTrailers = (IHeaderDictionary)new HttpResponseTrailers();
Http3\Http3QPackEncoderTests.cs (8)
81var headers = (IHeaderDictionary)new HttpResponseHeaders(); 100var headers = (IHeaderDictionary)new HttpResponseHeaders(); 119var headers = (IHeaderDictionary)new HttpResponseHeaders(); 138var headers = (IHeaderDictionary)new HttpResponseHeaders();
HttpHeadersTests.cs (2)
306var httpHeaders = (IHeaderDictionary)new HttpRequestHeaders();
HttpRequestHeadersTests.cs (18)
105IHeaderDictionary headers = new HttpRequestHeaders(); 123EnumerateEntries((IHeaderDictionary)headers); 127EnumerateEntries((IHeaderDictionary)headers); 174private static void EnumerateEntries(IHeaderDictionary headers) 555var prevHeaderValue = ((IHeaderDictionary)headers)[headerName].ToString(); 617var parsedHeaderValue1 = ((IHeaderDictionary)headers)[headerName].ToString(); 622var parsedHeaderValue2 = ((IHeaderDictionary)headers)[headerName].ToString(); 689var parsedAcceptHeaderValue = ((IHeaderDictionary)headers).Accept.ToString(); 690var parsedCookieHeaderValue = ((IHeaderDictionary)headers).Cookie.ToString(); 752var prevHeaderValue = ((IHeaderDictionary)headers)[headerName].ToString(); 765var nextHeaderValue = ((IHeaderDictionary)headers)[headerName].ToString(); 777nextHeaderValue = ((IHeaderDictionary)headers)[headerName].ToString(); 802var prevHeaderValue = ((IHeaderDictionary)headers)[headerName]; 814var nextHeaderValue = ((IHeaderDictionary)headers)[headerName].ToString(); 825nextHeaderValue = ((IHeaderDictionary)headers)[headerName].ToString(); 837IHeaderDictionary headers = new HttpRequestHeaders(); 854var prevHeaderValue = ((IHeaderDictionary)headers)[prevName].ToString(); 867var newHeaderValue = ((IHeaderDictionary)headers)[nextName].ToString();
HttpResponseHeadersTests.cs (18)
112((IHeaderDictionary)responseHeaders)[key] = value; 117((IHeaderDictionary)responseHeaders)[key] = new StringValues(new[] { "valid", value }); 152var responseHeaders = (IHeaderDictionary)new HttpResponseHeaders(); 170var responseHeaders = (IHeaderDictionary)new HttpResponseHeaders(); 195((IHeaderDictionary)responseHeaders).Allow = value; 201((IHeaderDictionary)responseHeaders).Accept = value; 206((IHeaderDictionary)responseHeaders)["Unknown"] = value; 211((IHeaderDictionary)responseHeaders)["Unknown"] = new StringValues(new[] { "valid", value }); 241((IHeaderDictionary)responseHeaders).Allow = value; 244((IHeaderDictionary)responseHeaders).Accept = value; 246((IHeaderDictionary)responseHeaders)["Unknown"] = value; 248((IHeaderDictionary)responseHeaders)["Unknown"] = new StringValues(new[] { "valid", value }); 252((IHeaderDictionary)responseHeaders).Clear(); 256((IHeaderDictionary)responseHeaders).Clear(); 330var exception = Assert.Throws<InvalidOperationException>(() => ((IHeaderDictionary)headers)["Content-Length"] = contentLength); 403IHeaderDictionary headers = new HttpResponseHeaders();
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (29)
HeaderCollectionBenchmark.cs (5)
152var headers = _response.Headers; 192var headers = _response.Headers; 246var headers = _response.Headers; 268var headers = _response.Headers; 306var headers = _response.Headers;
Http2\HPackHeaderWriterBenchmark.cs (2)
30var knownHeaders = (IHeaderDictionary)_knownResponseHeaders;
Http2\Http2ConnectionBenchmarkBase.cs (1)
26private IHeaderDictionary _httpRequestHeaders;
Http2\Http2FrameWriterBenchmark.cs (2)
59var headers = (IHeaderDictionary)_responseHeaders;
Http2\Http2HeadersEnumeratorBenchmark.cs (4)
16private IHeaderDictionary _knownSingleValueResponseHeaders; 17private IHeaderDictionary _knownMultipleValueResponseHeaders; 18private IHeaderDictionary _unknownSingleValueResponseHeaders; 19private IHeaderDictionary _unknownMultipleValueResponseHeaders;
Http3\Http3ConnectionBenchmarkBase.cs (1)
20private IHeaderDictionary _httpRequestHeaders;
Http3\QPackDecoderBenchmark.cs (5)
38((IHeaderDictionary)headers).ContentLength = 0; 39((IHeaderDictionary)headers).ContentType = "application/json"; 40((IHeaderDictionary)headers).Age = "0"; 41((IHeaderDictionary)headers).AcceptRanges = "bytes"; 42((IHeaderDictionary)headers).AccessControlAllowOrigin = "*";
ResponseHeaderCollectionBenchmark.cs (2)
120var headers = _response.Headers; 155var headers = _response.Headers;
ResponseHeadersWritingBenchmark.cs (7)
27private IHeaderDictionary _responseHeadersDict; 71var responseHeaders = _responseHeadersDict; 85var responseHeaders = _responseHeadersDict; 98var responseHeaders = _responseHeadersDict; 115var responseHeaders = _responseHeadersDict; 149var responseHeaders = _responseHeadersDict; 164var responseHeaders = _responseHeadersDict;
Microsoft.AspNetCore.Session (1)
SessionMiddleware.cs (1)
146var responseHeaders = response.Headers;
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\HttpSys\RequestProcessing\RequestHeaders.cs (1)
174long? IHeaderDictionary.ContentLength
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
Hubs.cs (1)
66var headers = context.Request.Headers;
Microsoft.AspNetCore.SignalR.Tests (1)
HttpHeaderConnectionHandler.cs (1)
23var headers = connection.Features.Get<IHttpContextFeature>().HttpContext.Request.Headers;
Microsoft.AspNetCore.TestHost (2)
ResponseFeature.cs (1)
62public IHeaderDictionary Headers { get; set; }
ResponseTrailersFeature.cs (1)
11public IHeaderDictionary Trailers { get; set; } = new HeaderDictionary();
Microsoft.AspNetCore.WebSockets (5)
HandshakeHelpers.cs (2)
20public static void GenerateResponseHeaders(bool isHttp1, IHeaderDictionary requestHeaders, string? subProtocol, IHeaderDictionary responseHeaders)
WebSocketMiddleware.cs (3)
227public static bool CheckSupportedWebSocketRequest(string method, IHeaderDictionary requestHeaders) 293public static bool CheckSupportedWebSocketRequestH2(string method, string? protocol, IHeaderDictionary requestHeaders) 300public static bool CheckWebSocketVersion(IHeaderDictionary requestHeaders)