From d6dc23f561429b4f626a65fb731a9035c3437655 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A3o=20Gottwald?= Date: Fri, 10 Aug 2012 20:48:09 +0200 Subject: [PATCH] Bug 815743 - Part 2: Backed out bug 588909. a=lsblakk --HG-- extra : transplant_source : %0A%D48%28%F1%88%AB%18D%D3%FB%16%24M%C3%FEDK%B0%F9 --- browser/branding/official/configure.sh | 1 + configure.in | 2 ++ netwerk/protocol/http/nsHttpHandler.cpp | 8 ++++++++ 3 files changed, 11 insertions(+) diff --git a/browser/branding/official/configure.sh b/browser/branding/official/configure.sh index 92ef14e03f401..55f3f1836eb14 100644 --- a/browser/branding/official/configure.sh +++ b/browser/branding/official/configure.sh @@ -3,3 +3,4 @@ # file, You can obtain one at http://mozilla.org/MPL/2.0/. MOZ_APP_DISPLAYNAME=Firefox +MOZ_UA_BUILDID=20100101 diff --git a/configure.in b/configure.in index 0ddb96f12f190..c3e17ce9d4102 100644 --- a/configure.in +++ b/configure.in @@ -8517,6 +8517,8 @@ AC_SUBST(MOZ_UA_OS_AGNOSTIC) if test -n "$MOZ_UA_OS_AGNOSTIC"; then AC_DEFINE(MOZ_UA_OS_AGNOSTIC) fi +AC_DEFINE_UNQUOTED(MOZ_UA_BUILDID, "$MOZ_UA_BUILDID") +AC_SUBST(MOZ_UA_BUILDID) # We can't use the static application.ini data when building against # a libxul SDK. diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp index 7b2b0c0494e5a..2b78d5aa83c6d 100644 --- a/netwerk/protocol/http/nsHttpHandler.cpp +++ b/netwerk/protocol/http/nsHttpHandler.cpp @@ -276,7 +276,15 @@ nsHttpHandler::Init() rv = InitConnectionMgr(); if (NS_FAILED(rv)) return rv; +#ifdef ANDROID mProductSub.AssignLiteral(MOZILLA_UAVERSION); +#else + mProductSub.AssignLiteral(MOZ_UA_BUILDID); +#endif + if (mProductSub.IsEmpty() && appInfo) + appInfo->GetPlatformBuildID(mProductSub); + if (mProductSub.Length() > 8) + mProductSub.SetLength(8); #if DEBUG // dump user agent prefs