Skip to content

Commit 42633a7

Browse files
authored
[StaticWebAssets] Make sure the quality is serialized as culture invariant (#44232)
1 parent 4fb94f2 commit 42633a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/StaticWebAssetsSdk/Tasks/ApplyCompressionNegotiation.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
using System.Diagnostics;
5+
using System.Globalization;
56
using Microsoft.Build.Framework;
67
using Microsoft.NET.Sdk.StaticWebAssets.Tasks;
78

@@ -102,7 +103,7 @@ public override bool Execute()
102103
{
103104
Name = "Content-Encoding",
104105
Value = compressedAsset.AssetTraitValue,
105-
Quality = Math.Round(1.0 / (length + 1), 12).ToString("F12")
106+
Quality = Math.Round(1.0 / (length + 1), 12).ToString("F12", CultureInfo.InvariantCulture)
106107
};
107108
Log.LogMessage(MessageImportance.Low, " Created Content-Encoding selector for compressed asset '{0}' with size '{1}' is '{2}'", encodingSelector.Value, encodingSelector.Quality, relatedEndpointCandidate.Route);
108109
var endpointCopy = new StaticWebAssetEndpoint

0 commit comments

Comments
 (0)