23 instantiations of StaticAssetResponseHeader
Microsoft.AspNetCore.StaticAssets (2)
Development\StaticAssetDevelopmentRuntimeHandler.cs (1)
316responseHeaders.Insert(i, new StaticAssetResponseHeader(HeaderNames.CacheControl, "no-cache"));
StaticAssetsInvoker.cs (1)
51_remainingHeaders.Add(new StaticAssetResponseHeader("ETag", _etag.ToString()));
Microsoft.AspNetCore.StaticAssets.Tests (21)
StaticAssetsIntegrationTests.cs (21)
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", $"\"{GetEtagForFile(compressedFilePath)}\""), 529new ("Last-Modified", lastModified.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)), 531new ("Content-Encoding", "gzip"), 532new ("Vary", "Accept-Encoding"), 581new ("Accept-Ranges", "bytes"), 582new("Content-Length", "Hello, World!".Length.ToString(CultureInfo.InvariantCulture)), 583new("Content-Type", GetContentType("sample.txt")), 584new ("ETag", $"\"{GetEtag("Hello, World!")}\""), 585new("Last-Modified", new DateTimeOffset(2023,03,03,0,0,0,TimeSpan.Zero).ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture))
13 references to StaticAssetResponseHeader
Microsoft.AspNetCore.StaticAssets (12)
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 (3)
93var header = descriptor.ResponseHeaders[i]; 306var responseHeaders = new List<StaticAssetResponseHeader>(descriptor.ResponseHeaders); 310var 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)
1049private record TestResource(string Path, string Content, bool IncludeCompressedVersion, StaticAssetResponseHeader[] AdditionalHeaders = null);