From a50a1db5a78c6441ec2994eeb49694920a4205e6 Mon Sep 17 00:00:00 2001 From: roytam1 Date: Tue, 9 Jul 2024 11:10:55 +0800 Subject: [PATCH] network: follow-up rev 914569c0b --- netwerk/protocol/http/nsHttpHandler.cpp | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index 44c66ba32b..a60152220d 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -353,7 +353,11 @@ nsHttpHandler::Init() if (mCompatPlatformEnabled) { mProductSub.Assign(mCompatPlatformVersion); } else { - mProductSub.AssignLiteral(MOZILLA_UAVERSION); + if (mCompatPlatformEnabled) { + mProductSub.Assign(mCompatPlatformVersion); + } else { + mProductSub.Assign(mAppBuildID); + } } } else { mProductSub.Assign(mAppBuildID); @@ -990,9 +994,17 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref) } if (mCompatGeckoEnabled) { - mProductSub.AssignLiteral(MOZILLA_UAVERSION); + if (mCompatPlatformEnabled) { + mProductSub.Assign(mCompatPlatformVersion); + } else { + mProductSub.AssignLiteral(MOZILLA_UAVERSION); + } } else { - mProductSub.Assign(mAppBuildID); + if (mCompatPlatformEnabled) { + mProductSub.Assign(mCompatPlatformVersion); + } else { + mProductSub.Assign(mAppBuildID); + } } // In case MOZILLA_UAVERSION is empty for some odd reason... if (mProductSub.IsEmpty()) { @@ -1019,7 +1031,11 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref) if (mCompatGeckoEnabled) { mMisc += mCompatFirefoxVersion; } else { - mMisc += MOZILLA_UAVERSION; + if (mCompatPlatformEnabled) { + mMisc += mCompatPlatformVersion; + } else { + mMisc += MOZILLA_UAVERSION; + } } mCompatFirefox.AssignLiteral("Firefox/"); mCompatFirefox += mCompatFirefoxVersion;