Skip to content

Commit

Permalink
Reorganized the default UserAgent header to match modern browsers.
Browse files Browse the repository at this point in the history
  • Loading branch information
xvitaly committed Oct 23, 2024
1 parent 2df4190 commit fbf8520
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/corelib/CurrentApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public CurrentApp(bool IsPortable, string AppName)
}

// Generating User-Agent header for outgoing HTTP queries...
UserAgent = string.Format(Properties.Resources.AppUserAgentTemplate, Platform.OSFriendlyName, Platform.UserAgentSuffix, Environment.OSVersion.Version.Major, Environment.OSVersion.Version.Minor, CultureInfo.CurrentCulture.Name, AppVersion, AppName, SystemArch);
UserAgent = string.Format(Properties.Resources.AppUserAgentTemplate, Platform.OSFriendlyName, Platform.UserAgentSuffix, SystemVersion, SystemArch, CultureInfo.CurrentCulture.Name, AppName, AppVersion);
}
}
}
2 changes: 1 addition & 1 deletion src/corelib/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/corelib/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<value>NT</value>
</data>
<data name="AppUserAgentTemplate" xml:space="preserve">
<value>Mozilla/5.0 ({0} {1} {2}.{3}; {4}; rv:{5}) {6} ({7})</value>
<value>Mozilla/5.0 ({0} {1} {2}; {3}; {4}) {5}/{6})</value>
</data>
<data name="BackUpLocalDir" xml:space="preserve">
<value>backups</value>
Expand Down

0 comments on commit fbf8520

Please sign in to comment.