@@ -50,12 +50,12 @@ public void AppliesContentNegotiationRules_ForExistingAssets()
50
50
CreateCandidateEndpoint (
51
51
"candidate.js" ,
52
52
Path . Combine ( "wwwroot" , "candidate.js" ) ,
53
- CreateHeaders ( "text/javascript" ) ) ,
53
+ CreateHeaders ( "text/javascript" , [ ( "Content-Length" , "20" ) ] ) ) ,
54
54
55
55
CreateCandidateEndpoint (
56
56
"candidate.js.gz" ,
57
57
Path . Combine ( "compressed" , "candidate.js.gz" ) ,
58
- CreateHeaders ( "text/javascript" ) )
58
+ CreateHeaders ( "text/javascript" , [ ( "Content-Length" , "9" ) ] ) )
59
59
] ,
60
60
TestResolveFileLength = value => value switch
61
61
{
@@ -79,19 +79,21 @@ string candidate when candidate.EndsWith(Path.Combine("compressed", "candidate.j
79
79
ResponseHeaders =
80
80
[
81
81
new ( ) { Name = "Content-Encoding" , Value = "gzip" } ,
82
+ new ( ) { Name = "Content-Length" , Value = "9" } ,
82
83
new ( ) { Name = "Content-Type" , Value = "text/javascript" } ,
83
84
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
84
85
] ,
85
86
EndpointProperties = [ ] ,
86
- Selectors = [ new ( ) { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000 " } ] ,
87
+ Selectors = [ new ( ) { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000000000 " } ] ,
87
88
} ,
88
89
new ( )
89
90
{
90
91
Route = "candidate.js" ,
91
92
AssetFile = Path . GetFullPath ( Path . Combine ( "wwwroot" , "candidate.js" ) ) ,
92
93
ResponseHeaders =
93
94
[
94
- new ( ) { Name = "Content-Type" , Value = "text/javascript" }
95
+ new ( ) { Name = "Content-Length" , Value = "20" } ,
96
+ new ( ) { Name = "Content-Type" , Value = "text/javascript" } ,
95
97
] ,
96
98
EndpointProperties = [ ] ,
97
99
Selectors = [ ] ,
@@ -103,6 +105,7 @@ string candidate when candidate.EndsWith(Path.Combine("compressed", "candidate.j
103
105
ResponseHeaders =
104
106
[
105
107
new ( ) { Name = "Content-Encoding" , Value = "gzip" } ,
108
+ new ( ) { Name = "Content-Length" , Value = "9" } ,
106
109
new ( ) { Name = "Content-Type" , Value = "text/javascript" } ,
107
110
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
108
111
] ,
@@ -188,7 +191,7 @@ string candidate when candidate.EndsWith(Path.Combine("compressed", "candidate.j
188
191
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
189
192
] ,
190
193
EndpointProperties = [ ] ,
191
- Selectors = [ new ( ) { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000 " } ] ,
194
+ Selectors = [ new ( ) { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000000000 " } ] ,
192
195
} ,
193
196
new ( )
194
197
{
@@ -212,7 +215,7 @@ string candidate when candidate.EndsWith(Path.Combine("compressed", "candidate.j
212
215
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
213
216
] ,
214
217
EndpointProperties = [ ] ,
215
- Selectors = [ new ( ) { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000 " } ] ,
218
+ Selectors = [ new ( ) { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000000000 " } ] ,
216
219
} ,
217
220
new ( )
218
221
{
@@ -288,7 +291,7 @@ public void AppliesContentNegotiationRules_IgnoresAlreadyProcessedEndpoints()
288
291
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
289
292
] ,
290
293
EndpointProperties = [ ] ,
291
- Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000 " } ] ,
294
+ Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000000000 " } ] ,
292
295
} ,
293
296
new ( ) {
294
297
Route = "candidate.js" ,
@@ -310,7 +313,7 @@ public void AppliesContentNegotiationRules_IgnoresAlreadyProcessedEndpoints()
310
313
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
311
314
] ,
312
315
EndpointProperties = [ ] ,
313
- Selectors = [ new ( ) { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000 " } ] ,
316
+ Selectors = [ new ( ) { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000000000 " } ] ,
314
317
} ,
315
318
new ( ) {
316
319
Route = "candidate.fingerprint.js" ,
@@ -361,7 +364,7 @@ string candidate when candidate.EndsWith(Path.Combine("compressed", "candidate.j
361
364
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
362
365
] ,
363
366
EndpointProperties = [ ] ,
364
- Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000 " } ] ,
367
+ Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000000000 " } ] ,
365
368
} ,
366
369
new StaticWebAssetEndpoint
367
370
{
@@ -385,7 +388,7 @@ string candidate when candidate.EndsWith(Path.Combine("compressed", "candidate.j
385
388
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
386
389
] ,
387
390
EndpointProperties = [ ] ,
388
- Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000 " } ] ,
391
+ Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000000000 " } ] ,
389
392
} ,
390
393
new StaticWebAssetEndpoint
391
394
{
@@ -473,7 +476,7 @@ public void AppliesContentNegotiationRules_ProcessesNewCompressedFormatsWhenAvai
473
476
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
474
477
] ,
475
478
EndpointProperties = [ ] ,
476
- Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000 " } ] ,
479
+ Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000000000 " } ] ,
477
480
} ,
478
481
new ( ) {
479
482
Route = "candidate.js" ,
@@ -495,7 +498,7 @@ public void AppliesContentNegotiationRules_ProcessesNewCompressedFormatsWhenAvai
495
498
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
496
499
] ,
497
500
EndpointProperties = [ ] ,
498
- Selectors = [ new ( ) { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000 " } ] ,
501
+ Selectors = [ new ( ) { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000000000 " } ] ,
499
502
} ,
500
503
new ( ) {
501
504
Route = "candidate.fingerprint.js" ,
@@ -557,7 +560,7 @@ string candidate when candidate.EndsWith(Path.Combine("compressed", "candidate.j
557
560
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
558
561
] ,
559
562
EndpointProperties = [ ] ,
560
- Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000 " } ] ,
563
+ Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000000000 " } ] ,
561
564
} ,
562
565
new StaticWebAssetEndpoint
563
566
{
@@ -570,7 +573,7 @@ string candidate when candidate.EndsWith(Path.Combine("compressed", "candidate.j
570
573
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
571
574
] ,
572
575
EndpointProperties = [ ] ,
573
- Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "br" , Quality = "0.100000 " } ] ,
576
+ Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "br" , Quality = "0.100000000000 " } ] ,
574
577
} ,
575
578
new StaticWebAssetEndpoint
576
579
{
@@ -594,7 +597,7 @@ string candidate when candidate.EndsWith(Path.Combine("compressed", "candidate.j
594
597
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
595
598
] ,
596
599
EndpointProperties = [ ] ,
597
- Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000 " } ] ,
600
+ Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "gzip" , Quality = "0.100000000000 " } ] ,
598
601
} ,
599
602
new StaticWebAssetEndpoint
600
603
{
@@ -607,7 +610,7 @@ string candidate when candidate.EndsWith(Path.Combine("compressed", "candidate.j
607
610
new ( ) { Name = "Vary" , Value = "Content-Encoding" }
608
611
] ,
609
612
EndpointProperties = [ ] ,
610
- Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "br" , Quality = "0.100000 " } ] ,
613
+ Selectors = [ new StaticWebAssetEndpointSelector { Name = "Content-Encoding" , Value = "br" , Quality = "0.100000000000 " } ] ,
611
614
} ,
612
615
new StaticWebAssetEndpoint
613
616
{
@@ -657,7 +660,7 @@ private StaticWebAssetEndpointSelector[] CreateContentEcondingSelector(string na
657
660
{
658
661
Name = name ,
659
662
Value = value ,
660
- Quality = "0.100000 "
663
+ Quality = "0.100000000000 "
661
664
}
662
665
] ;
663
666
}
0 commit comments