3 implementations of ETag
Microsoft.AspNetCore.Server.Kestrel.Core (3)
Internal\Http\HttpHeaders.Generated.cs (3)
2107StringValues IHeaderDictionary.ETag 9397StringValues IHeaderDictionary.ETag 15530StringValues IHeaderDictionary.ETag
26 writes to ETag
InMemory.FunctionalTests (9)
Http2\Http2StreamTests.cs (7)
2473Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.ETag = "Custom 你好 Tag"); 2516context.Features.Get<IHttpResponseTrailersFeature>().Trailers.ETag = "Custom 你好 Tag"; 3529context.Response.Headers.ETag = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 3565context.Response.Headers.ETag = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 3603context.Response.Headers.ETag = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize); 3654context.Response.Headers.ETag = new string('a', 17002); 3683context.Response.Headers.ETag = new string('a', (int)Http2PeerSettings.DefaultMaxFrameSize - 20);
Http3\Http3StreamTests.cs (2)
1017Assert.Throws<InvalidOperationException>(() => context.Features.Get<IHttpResponseTrailersFeature>().Trailers.ETag = "Custom 你好 Tag"); 1048context.Features.Get<IHttpResponseTrailersFeature>().Trailers.ETag = "Custom 你好 Tag";
Microsoft.AspNetCore.Components.Endpoints (2)
Builder\ResourceCollectionUrlEndpoint.cs (2)
216context.Response.Headers.ETag = new StringValues(_gzipContentETags); 221context.Response.Headers.ETag = new StringValues(_contentETag);
Microsoft.AspNetCore.Diagnostics (1)
ExceptionHandler\ExceptionHandlerMiddlewareImpl.cs (1)
259headers.ETag = default;
Microsoft.AspNetCore.Http.Extensions.Tests (4)
HeaderDictionaryTypeExtensionsTest.cs (4)
95context.Request.Headers.ETag = "\"123\""; 108context.Request.Headers.ETag = expected.ToString("r"); 119context.Request.Headers.ETag = $"{int.MaxValue + 1L}"; 229context.Request.Headers.ETag = "\"123\",\"456\"";
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
Http2\Http2HeadersEnumeratorTests.cs (1)
60responseTrailers.ETag = "ETag!";
Http3\Http3HeadersEnumeratorTests.cs (1)
60responseTrailers.ETag = "ETag!";
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (3)
HeaderCollectionBenchmark.cs (1)
161headers.ETag = "\"54ef7954-1078\"";
ResponseHeaderCollectionBenchmark.cs (1)
129headers.ETag = "\"54ef7954-1078\"";
ResponseHeadersWritingBenchmark.cs (1)
126responseHeaders.ETag = "\"54ef7954-1078\"";
Microsoft.AspNetCore.StaticAssets (4)
Development\StaticAssetDevelopmentRuntimeHandler.cs (4)
98_context.Response.Headers.ETag = ""; 120_context.Response.Headers.ETag = new StringValues([$"\"{eTag}\"", weakETag]); 128_context.Response.Headers.ETag = ""; 130_context.Response.Headers.ETag = GetETag(fileInfo);
OutputCachingSample (1)
Startup.cs (1)
64context.Response.Headers.ETag = etag;
41 references to ETag
Microsoft.AspNetCore.Http.Extensions.Tests (4)
ParameterBindingMethodCacheTests.cs (4)
1082if (!int.TryParse(context.Request.Headers.ETag, out var val)) 1098if (!int.TryParse(context.Request.Headers.ETag, out var val)) 1117if (!int.TryParse(context.Request.Headers.ETag, out var val)) 1130if (!int.TryParse(context.Request.Headers.ETag, out var val))
Microsoft.AspNetCore.Http.Results.Tests (17)
src\Shared\ResultsTests\FileContentResultTestBase.cs (6)
82Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 120Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 160Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 194Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 226Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 256Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag);
src\Shared\ResultsTests\FileStreamResultTestBase.cs (7)
61Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 101Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 143Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 180Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 214Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 246Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 361Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag);
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
90Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag);
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (3)
107Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 141Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 174Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag);
Microsoft.AspNetCore.Mvc.Core.Test (17)
src\Shared\ResultsTests\FileContentResultTestBase.cs (6)
82Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 120Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 160Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 194Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 226Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 256Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag);
src\Shared\ResultsTests\FileStreamResultTestBase.cs (7)
61Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 101Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 143Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 180Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 214Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 246Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 361Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag);
src\Shared\ResultsTests\PhysicalFileResultTestBase.cs (1)
90Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag);
src\Shared\ResultsTests\VirtualFileResultTestBase.cs (3)
107Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 141Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag); 174Assert.Equal(entityTag.ToString(), httpResponse.Headers.ETag);
Microsoft.AspNetCore.ResponseCaching (2)
ResponseCachingMiddleware.cs (2)
442if (!StringValues.IsNullOrEmpty(cachedResponseHeaders.ETag) 443&& EntityTagHeaderValue.TryParse(cachedResponseHeaders.ETag.ToString(), out eTag)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
HeaderCollectionBenchmark.cs (1)
280value = headers.ETag;