Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use invariant culture for uppercase & lowercase #72

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Assets/Xsolla/Core/WebRequests/WebRequestHelper.Analytics.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Globalization;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
Expand Down Expand Up @@ -99,8 +100,8 @@ private List<WebRequestHeader> GetAnalyticHeaders(SdkType analyticsType)
string referralPlugin = _referralAnalytics.Value.Key;
string referralVersion = _referralAnalytics.Value.Value;

result.Add(new WebRequestHeader() {Name = "X-REF", Value = referralPlugin.ToUpper()});
result.Add(new WebRequestHeader() {Name = "X-REF-V", Value = referralVersion.ToUpper()});
result.Add(new WebRequestHeader() {Name = "X-REF", Value = referralPlugin.ToUpper(CultureInfo.InvariantCulture)});
result.Add(new WebRequestHeader() {Name = "X-REF-V", Value = referralVersion.ToUpper(CultureInfo.InvariantCulture)});
}

return result;
Expand Down Expand Up @@ -145,11 +146,11 @@ private void GetUnityParameters(bool toUpper, out string engineVersion, out stri

if (toUpper)
{
engineVersion = engineVersion.ToUpper();
buildPlatform = buildPlatform.ToUpper();
engineVersion = engineVersion.ToUpper(CultureInfo.InvariantCulture);
buildPlatform = buildPlatform.ToUpper(CultureInfo.InvariantCulture);
}
else
buildPlatform = buildPlatform.ToLower();
buildPlatform = buildPlatform.ToLower(CultureInfo.InvariantCulture);
}
}
}