249 writes to Value
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (4)
StaticWebAssetsBaselineFactory.cs (4)
124
header.
Value
= "__content-length__";
127
header.
Value
= "__etag__";
130
header.
Value
= "__last-modified__";
142
header.
Value
= string.Join(", ", cleaned);
Microsoft.NET.Sdk.StaticWebAssets.Tasks (13)
ApplyCompressionNegotiation.cs (5)
92
Value
= "Accept-Encoding"
147
Value
= "Accept-Encoding"
227
Value
= compressedAsset.AssetTraitValue
232
Value
= "Accept-Encoding"
410
Value
= $"W/{header.Value}"
DefineStaticWebAssetEndpoints.cs (6)
133
Value
= length,
138
Value
= mimeType,
143
Value
= $"\"{asset.Integrity}\"",
148
Value
= lastModified,
157
headers[4] = new() { Name = "Cache-Control",
Value
= "max-age=31536000, immutable" };
164
headers[4] = new() { Name = "Cache-Control",
Value
= !string.IsNullOrEmpty(cacheSetting) ? cacheSetting : "no-cache" };
UpdateStaticWebAssetEndpoints.cs (2)
224
(name, value) => new StaticWebAssetEndpointResponseHeader { Name = name,
Value
= value },
332
Value
= operation.Value
Microsoft.NET.Sdk.StaticWebAssets.Tests (232)
StaticWebAssets\ApplyCompressionNegotiationTest.cs (166)
83
new () { Name = "Content-Encoding",
Value
= "gzip" },
84
new () { Name = "Content-Length",
Value
= "9" },
85
new () { Name = "Content-Type",
Value
= "text/javascript" },
86
new () { Name = "Vary",
Value
= "Accept-Encoding" }
97
new () { Name = "Content-Length",
Value
= "20" },
98
new () { Name = "Content-Type",
Value
= "text/javascript" },
99
new () { Name = "Vary",
Value
= "Accept-Encoding" },
110
new () { Name = "Content-Encoding",
Value
= "gzip" },
111
new () { Name = "Content-Length",
Value
= "9" },
112
new () { Name = "Content-Type",
Value
= "text/javascript" },
113
new () { Name = "Vary",
Value
= "Accept-Encoding" }
204
Value
= "max-age=31536000, immutable"
209
Value
= "br"
214
Value
= "7"
219
Value
= "text/javascript"
224
Value
= "\u0022compressed-brotli\u0022"
229
Value
= now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)
234
Value
= "Accept-Encoding"
270
Value
= "max-age=31536000, immutable"
275
Value
= "gzip"
280
Value
= "9"
285
Value
= "text/javascript"
290
Value
= "\u0022compressed-gzip\u0022"
295
Value
= now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)
300
Value
= "Accept-Encoding"
328
Value
= "max-age=31536000, immutable"
333
Value
= "20"
338
Value
= "text/javascript"
343
Value
= "\u0022original\u0022"
348
Value
= now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)
353
Value
= "Accept-Encoding"
381
Value
= "max-age=31536000, immutable"
386
Value
= "br"
391
Value
= "7"
396
Value
= "text/javascript"
401
Value
= "\u0022compressed-brotli\u0022"
406
Value
= now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)
411
Value
= "Accept-Encoding"
439
Value
= "max-age=31536000, immutable"
444
Value
= "gzip"
449
Value
= "9"
454
Value
= "text/javascript"
459
Value
= "\u0022compressed-gzip\u0022"
464
Value
= now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)
469
Value
= "Accept-Encoding"
505
Value
= "no-cache"
510
Value
= "br"
515
Value
= "7"
520
Value
= "text/javascript"
525
Value
= "\u0022compressed-brotli\u0022"
530
Value
= now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)
535
Value
= "Accept-Encoding"
561
Value
= "no-cache"
566
Value
= "gzip"
571
Value
= "9"
576
Value
= "text/javascript"
581
Value
= "\u0022compressed-gzip\u0022"
586
Value
= now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)
591
Value
= "Accept-Encoding"
609
Value
= "no-cache"
614
Value
= "20"
619
Value
= "text/javascript"
624
Value
= "\u0022original\u0022"
629
Value
= now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)
634
Value
= "Accept-Encoding"
652
Value
= "no-cache"
657
Value
= "br"
662
Value
= "7"
667
Value
= "text/javascript"
672
Value
= "\u0022compressed-brotli\u0022"
677
Value
= now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)
682
Value
= "Accept-Encoding"
699
Value
= "no-cache"
703
Value
= "gzip"
707
Value
= "9"
711
Value
= "text/javascript"
715
Value
= "\u0022compressed-gzip\u0022"
719
Value
= now.ToString("ddd, dd MMM yyyy HH:mm:ss 'GMT'", CultureInfo.InvariantCulture)
723
Value
= "Accept-Encoding"
809
new () { Name = "Content-Encoding",
Value
= "gzip" },
810
new () { Name = "Content-Type",
Value
= "text/javascript" },
811
new () { Name = "Vary",
Value
= "Accept-Encoding" }
822
new () { Name = "Content-Type",
Value
= "text/javascript" },
823
new () { Name = "Vary",
Value
= "Accept-Encoding" }
834
new () { Name = "Content-Encoding",
Value
= "gzip" },
835
new () { Name = "Content-Type",
Value
= "text/javascript" },
836
new () { Name = "Vary",
Value
= "Accept-Encoding" }
847
new () { Name = "Content-Type",
Value
= "text/javascript" },
848
new () { Name = "Vary",
Value
= "Accept-Encoding" }
859
new () { Name = "Content-Encoding",
Value
= "gzip" },
860
new () { Name = "Content-Type",
Value
= "text/javascript" },
861
new () { Name = "Vary",
Value
= "Accept-Encoding" }
914
new () { Name = "Content-Encoding",
Value
= "gzip" },
915
new (){ Name = "Content-Type",
Value
= "text/javascript" },
916
new (){ Name = "Vary",
Value
= "Accept-Encoding" }
927
new (){ Name = "Content-Type",
Value
= "text/javascript" }
938
new (){ Name = "Content-Encoding",
Value
= "gzip" },
939
new (){ Name = "Content-Type",
Value
= "text/javascript" },
940
new (){ Name = "Vary",
Value
= "Accept-Encoding" }
951
new () { Name = "Content-Type",
Value
= "text/javascript" }
962
new () { Name = "Content-Encoding",
Value
= "gzip" },
963
new () { Name = "Content-Type",
Value
= "text/javascript" },
964
new () { Name = "Vary",
Value
= "Accept-Encoding" }
985
new () { Name = "Content-Encoding",
Value
= "gzip" },
986
new () { Name = "Content-Type",
Value
= "text/javascript" },
987
new () { Name = "Vary",
Value
= "Accept-Encoding" }
998
new () { Name = "Content-Type",
Value
= "text/javascript" },
999
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1010
new () { Name = "Content-Encoding",
Value
= "gzip" },
1011
new () { Name = "Content-Type",
Value
= "text/javascript" },
1012
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1023
new () { Name = "Content-Type",
Value
= "text/javascript" },
1024
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1035
new () { Name = "Content-Encoding",
Value
= "gzip" },
1036
new () { Name = "Content-Type",
Value
= "text/javascript" },
1037
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1106
new () { Name = "Content-Encoding",
Value
= "gzip" },
1107
new (){ Name = "Content-Type",
Value
= "text/javascript" },
1108
new (){ Name = "Vary",
Value
= "Accept-Encoding" }
1119
new (){ Name = "Content-Type",
Value
= "text/javascript" }
1130
new (){ Name = "Content-Encoding",
Value
= "gzip" },
1131
new (){ Name = "Content-Type",
Value
= "text/javascript" },
1132
new (){ Name = "Vary",
Value
= "Accept-Encoding" }
1143
new () { Name = "Content-Type",
Value
= "text/javascript" }
1154
new () { Name = "Content-Encoding",
Value
= "gzip" },
1155
new () { Name = "Content-Type",
Value
= "text/javascript" },
1156
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1167
new () { Name = "Content-Type",
Value
= "text/javascript" },
1188
new () { Name = "Content-Encoding",
Value
= "gzip" },
1189
new () { Name = "Content-Type",
Value
= "text/javascript" },
1190
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1201
new () { Name = "Content-Encoding",
Value
= "br" },
1202
new () { Name = "Content-Type",
Value
= "text/javascript" },
1203
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1214
new () { Name = "Content-Type",
Value
= "text/javascript" },
1215
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1226
new () { Name = "Content-Encoding",
Value
= "gzip" },
1227
new () { Name = "Content-Type",
Value
= "text/javascript" },
1228
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1239
new () { Name = "Content-Encoding",
Value
= "br" },
1240
new () { Name = "Content-Type",
Value
= "text/javascript" },
1241
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1252
new () { Name = "Content-Type",
Value
= "text/javascript" },
1253
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1264
new () { Name = "Content-Encoding",
Value
= "gzip" },
1265
new () { Name = "Content-Type",
Value
= "text/javascript" },
1266
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1277
new () { Name = "Content-Encoding",
Value
= "br" },
1278
new () { Name = "Content-Type",
Value
= "text/javascript" },
1279
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1372
new () { Name = "Content-Encoding",
Value
= "gzip" },
1373
new () { Name = "Content-Length",
Value
= "9" },
1374
new () { Name = "Content-Type",
Value
= "text/javascript" },
1375
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1386
new () { Name = "Content-Length",
Value
= "20" },
1387
new () { Name = "Content-Type",
Value
= "text/javascript" },
1388
new () { Name = "Vary",
Value
= "Accept-Encoding" },
1399
new () { Name = "Content-Encoding",
Value
= "gzip" },
1400
new () { Name = "Content-Length",
Value
= "9" },
1401
new () { Name = "Content-Type",
Value
= "text/javascript" },
1402
new () { Name = "Vary",
Value
= "Accept-Encoding" }
1413
new () { Name = "Content-Length",
Value
= "18" },
1414
new () { Name = "Content-Type",
Value
= "text/javascript" },
1415
new () { Name = "Vary",
Value
= "Accept-Encoding" },
1429
Value
= contentType
1431
..(AdditionalHeaders ?? []).Select(h => new StaticWebAssetEndpointResponseHeader { Name = h.name,
Value
= h.value })
StaticWebAssets\DefineStaticWebAssetEndpointsTest.cs (34)
64
Value
= "no-cache"
69
Value
= "10"
74
Value
= "text/javascript"
79
Value
= "\"integrity\""
84
Value
= "Thu, 15 Nov 1990 00:00:00 GMT"
149
Value
= "10"
154
Value
= "text/javascript"
159
Value
= "\"asdf1234\""
164
Value
= "Thu, 15 Nov 1990 00:00:00 GMT"
169
Value
= "max-age=31536000, immutable"
181
Value
= "no-cache"
186
Value
= "10"
191
Value
= "text/javascript"
196
Value
= "\"asdf1234\""
201
Value
= "Thu, 15 Nov 1990 00:00:00 GMT"
266
Value
= "10"
271
Value
= "text/javascript"
276
Value
= "\"asdf1234\""
281
Value
= "Thu, 15 Nov 1990 00:00:00 GMT"
286
Value
= "max-age=31536000, immutable"
298
Value
= "no-cache"
303
Value
= "10"
308
Value
= "text/javascript"
313
Value
= "\"asdf1234\""
318
Value
= "Thu, 15 Nov 1990 00:00:00 GMT"
336
Value
= "10"
340
Value
= "text/javascript"
344
Value
= "integrity"
348
Value
= "Thu, 15 Nov 1990 00:00:00 GMT"
560
Value
= "10"
565
Value
= "text/css"
570
Value
= "\"asdf1234\""
575
Value
= "Thu, 15 Nov 1990 00:00:00 GMT"
580
Value
= "max-age=31536000, immutable"
StaticWebAssets\GenerateStaticWebAssetEndpointsManifestTest.cs (20)
29
Value
= "max-age=31536000, immutable"
33
Value
= "10"
37
Value
= "text/html"
41
Value
= "\"integrity\""
45
Value
= "Sat, 01 Jan 2000 00:00:01 GMT"
72
Value
= "max-age=31536000, immutable"
76
Value
= "10"
80
Value
= "text/javascript"
84
Value
= "\"integrity\""
88
Value
= "Sat, 01 Jan 2000 00:00:01 GMT"
115
Value
= "no-cache"
119
Value
= "10"
123
Value
= "text/html"
127
Value
= "\"integrity\""
131
Value
= "Sat, 01 Jan 2000 00:00:01 GMT"
148
Value
= "no-cache"
152
Value
= "10"
156
Value
= "text/javascript"
160
Value
= "\"integrity\""
164
Value
= "Sat, 01 Jan 2000 00:00:01 GMT"
StaticWebAssets\GenerateStaticWebAssetEndpointsPropsFileTest.cs (2)
62
Value
= "10"
132
Value
= "10"
StaticWebAssets\GenerateStaticWebAssetsManifestTest.cs (4)
123
Value
= "__content-type__"
128
Value
= "__content-length__",
133
Value
= "__etag__",
138
Value
= "__last-modified__"
StaticWebAssets\UpdateStaticWebAssetEndpointsTest.cs (2)
119
endpoint.ResponseHeaders = [.. endpoint.ResponseHeaders, new StaticWebAssetEndpointResponseHeader { Name = "ETag",
Value
= "W/\"integrity\"" }];
164
endpoint.ResponseHeaders = [.. endpoint.ResponseHeaders, new StaticWebAssetEndpointResponseHeader { Name = "ETag",
Value
= "W/\"integrity\"" }];
StaticWebAssetsBaselineFactory.cs (4)
124
header.
Value
= "__content-length__";
127
header.
Value
= "__etag__";
130
header.
Value
= "__last-modified__";
142
header.
Value
= string.Join(", ", cleaned);
46 references to Value
Microsoft.NET.Sdk.BlazorWebAssembly.Tests (5)
StaticWebAssetsBaselineComparer.cs (4)
141
Array.Sort(endpoint.ResponseHeaders, (a, b) => (a.Name, a.
Value
).CompareTo((b.Name, b.
Value
)));
467
assetDifferences.Add($"Expected manifest to have response header '{difference.Name}={difference.
Value
}' but it was not found.");
471
assetDifferences.Add($"Found unexpected response header '{difference.Name}={difference.
Value
}'.");
StaticWebAssetsBaselineFactory.cs (1)
134
var values = header.
Value
.Split(',').Select(v => v.Trim());
Microsoft.NET.Sdk.StaticWebAssets.Tasks (16)
ApplyCompressionNegotiation.cs (4)
169
header.
Value
.Contains("Accept-Encoding", StringComparison.OrdinalIgnoreCase))
265
Value = header.
Value
410
Value = $"W/{header.
Value
}"
414
Log.LogMessage(MessageImportance.Low, "Adding Content-Type '{1}' header to related endpoint '{0}'", relatedEndpointCandidate.Route, header.
Value
);
Data\StaticWebAssetEndpoint.cs (2)
359
responseHeaderComparison = ResponseHeaders[i].
Value
.CompareTo(other.ResponseHeaders[i].
Value
);
Data\StaticWebAssetEndpointResponseHeader.cs (6)
29
private string GetDebuggerDisplay() => $"{Name}: {
Value
}";
35
string.Equals(
Value
, other.
Value
, StringComparison.Ordinal);
45
return HashCode.Combine(Name,
Value
);
51
0 => string.CompareOrdinal(
Value
, other.
Value
),
FilterStaticWebAssetEndpoints.cs (1)
122
if (MeetsCriteria(criteria, header.Name, header.
Value
))
UpdateStaticWebAssetEndpoints.cs (3)
132
var (headers, headerRemoved) = RemoveAllIfFound(endpoint.ResponseHeaders, h => h.Name, h => h.
Value
, operation.Name, operation.Value);
223
h => h.
Value
,
290
var (headers, headerRemoved) = RemoveFirstIfFound(endpoint.ResponseHeaders, h => h.Name, h => h.
Value
, operation.Name, operation.Value);
Microsoft.NET.Sdk.StaticWebAssets.Tests (25)
StaticWebAssetEndpointsIntegrationTest.cs (1)
198
var length = long.Parse(contentLength.
Value
, CultureInfo.InvariantCulture);
StaticWebAssets\ApplyCompressionNegotiationTest.cs (2)
1562
compressedEndpoint.ResponseHeaders.Should().Contain(h => h.Name == "ETag" && h.
Value
== "W/\"original-etag\"");
1696
compressedEndpoint.ResponseHeaders.Should().NotContain(h => h.Name == "ETag" && h.
Value
.StartsWith("W/"));
StaticWebAssets\DefineStaticWebAssetEndpointsTest.cs (2)
430
endpoint.ResponseHeaders.Should().ContainSingle(h => h.Name == "Content-Type" && h.
Value
== "application/x-gzip");
481
endpoint.ResponseHeaders.Should().ContainSingle(h => h.Name == "Content-Type" && h.
Value
== "text/css");
StaticWebAssets\FilterStaticWebAssetEndpointsTest.cs (2)
128
filteredEndpoints.Should().AllSatisfy(e => e.ResponseHeaders.Should().ContainSingle(p => p.Name == "Content-Type" && p.
Value
== "text/html"));
238
filteredEndpoints.Should().AllSatisfy(e => e.ResponseHeaders.Should().ContainSingle(p => p.Name == "Content-Type" && p.
Value
== "text/html"));
StaticWebAssets\UpdateStaticWebAssetEndpointsTest.cs (5)
56
updatedEndpoint.ResponseHeaders.Should().ContainSingle(h => string.Equals(h.Name, "Cache-Control", StringComparison.Ordinal) && string.Equals(h.
Value
, "immutable"));
187
updatedEndpoint.ResponseHeaders.Should().ContainSingle(h => string.Equals(h.Name, "ETag", StringComparison.Ordinal) && string.Equals(h.
Value
, "\"integrity\"", StringComparison.Ordinal));
188
updatedEndpoint.ResponseHeaders.Should().NotContain(h => string.Equals(h.Name, "ETag", StringComparison.Ordinal) && string.Equals(h.
Value
, "W/\"integrity\"", StringComparison.Ordinal));
229
updatedEndpoint.ResponseHeaders.Should().ContainSingle(h => string.Equals(h.Name, "Cache-Control", StringComparison.Ordinal) && string.Equals(h.
Value
, "immutable"));
291
updatedEndpoint.ResponseHeaders.Should().ContainSingle(h => string.Equals(h.Name, "Cache-Control", StringComparison.Ordinal) && string.Equals(h.
Value
, "immutable"));
StaticWebAssetsBaselineComparer.cs (4)
141
Array.Sort(endpoint.ResponseHeaders, (a, b) => (a.Name, a.
Value
).CompareTo((b.Name, b.
Value
)));
467
assetDifferences.Add($"Expected manifest to have response header '{difference.Name}={difference.
Value
}' but it was not found.");
471
assetDifferences.Add($"Found unexpected response header '{difference.Name}={difference.
Value
}'.");
StaticWebAssetsBaselineFactory.cs (1)
134
var values = header.
Value
.Split(',').Select(v => v.Trim());
StaticWebAssetsCompressionIntegrationTest.cs (8)
74
endpoint.ResponseHeaders.Where(e => e.Name == "Content-Encoding").Select(e => e.
Value
).Single().Should().Be("gzip");
76
var etags = endpoint.ResponseHeaders.Where(e => e.Name == "ETag").Select(e => EntityTagHeaderValue.Parse(e.
Value
));
86
endpoint.ResponseHeaders.Where(e => e.Name == "Content-Encoding").Select(e => e.
Value
).Single().Should().Be("br");
88
var etags = endpoint.ResponseHeaders.Where(e => e.Name == "ETag").Select(e => EntityTagHeaderValue.Parse(e.
Value
));
186
endpoint.ResponseHeaders.Where(e => e.Name == "Content-Encoding").Select(e => e.
Value
).Single().Should().Be("gzip");
188
var etags = endpoint.ResponseHeaders.Where(e => e.Name == "ETag").Select(e => EntityTagHeaderValue.Parse(e.
Value
));
198
endpoint.ResponseHeaders.Where(e => e.Name == "Content-Encoding").Select(e => e.
Value
).Single().Should().Be("br");
200
var etags = endpoint.ResponseHeaders.Where(e => e.Name == "ETag").Select(e => EntityTagHeaderValue.Parse(e.
Value
));