24 instantiations of StaticAssetResponseHeader
Microsoft.AspNetCore.StaticAssets (2)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
266responseHeaders.Insert(i, new StaticAssetResponseHeader(HeaderNames.CacheControl, "no-cache"));
StaticAssetsInvoker.cs (1)
51_remainingHeaders.Add(new StaticAssetResponseHeader("ETag", _etag.ToString()));
Microsoft.AspNetCore.StaticAssets.Tests (22)
StaticAssetsIntegrationTests.cs (22)
83new TestResource("sample.txt", "Hello, World!", false, [new("Cache-Control", "immutable")]), 134new TestResource("sample.txt", "Hello, World!", false, [new("Cache-Control", "immutable")]), 186new TestResource("sample.txt", "Hello, World!", false, [new("Cache-Control", "immutable")]), 243new TestResource("sample.txt", "Hello, World!", false, [new("Cache-Control", "immutable")]), 503new ("Accept-Ranges", "bytes"), 504new("Content-Length", resource.Content.Length.ToString(CultureInfo.InvariantCulture)), 505new("Content-Type", GetContentType(filePath)), 506new ("ETag", $"\"{hash}\""), 507new("Last-Modified", lastModified.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)), 524new ("Accept-Ranges", "bytes"), 525new ("Content-Type", GetContentType(filePath)), 527new ("Content-Length", length.ToString(CultureInfo.InvariantCulture)), 528new ("ETag", $"W/\"{GetEtag(resource.Content)}\""), 529new ("ETag", $"\"{GetEtagForFile(compressedFilePath)}\""), 530new ("Last-Modified", lastModified.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)), 532new ("Content-Encoding", "gzip"), 533new ("Vary", "Accept-Encoding"), 582new ("Accept-Ranges", "bytes"), 583new("Content-Length", "Hello, World!".Length.ToString(CultureInfo.InvariantCulture)), 584new("Content-Type", GetContentType("sample.txt")), 585new ("ETag", $"\"{GetEtag("Hello, World!")}\""), 586new("Last-Modified", new DateTimeOffset(2023,03,03,0,0,0,TimeSpan.Zero).ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture))
12 references to StaticAssetResponseHeader
Microsoft.AspNetCore.StaticAssets (11)
Development\StaticAssetDescriptorExtensions.cs (4)
14foreach (var header in descriptor.ResponseHeaders) 27foreach (var header in descriptor.ResponseHeaders) 40foreach (var header in descriptor.ResponseHeaders) 70foreach (var header in descriptor.ResponseHeaders)
Development\StaticAssetDevelopmentRuntimeHandler.cs (2)
256var responseHeaders = new List<StaticAssetResponseHeader>(descriptor.ResponseHeaders); 260var responseHeader = descriptor.ResponseHeaders[i];
StaticAssetDescriptor.cs (2)
20private IReadOnlyList<StaticAssetResponseHeader> _responseHeaders = []; 65public IReadOnlyList<StaticAssetResponseHeader> ResponseHeaders
StaticAssetsInvoker.cs (3)
28private readonly List<StaticAssetResponseHeader> _remainingHeaders; 39foreach (var responseHeader in resource.ResponseHeaders) 105foreach (var header in _remainingHeaders ?? [])
Microsoft.AspNetCore.StaticAssets.Tests (1)
StaticAssetsIntegrationTests.cs (1)
1050private record TestResource(string Path, string Content, bool IncludeCompressedVersion, StaticAssetResponseHeader[] AdditionalHeaders = null);