2
2
Author: Chris Coulson <chris.coulson@canonical.com>
3
3
Forwarded: not-needed
5
Index: firefox-trunk-43.0~a1~hg20150916r262830/netwerk/protocol/http/nsHttpHandler.cpp
6
===================================================================
7
--- firefox-trunk-43.0~a1~hg20150916r262830.orig/netwerk/protocol/http/nsHttpHandler.cpp 2015-09-17 19:42:31.429286277 +0100
8
+++ firefox-trunk-43.0~a1~hg20150916r262830/netwerk/protocol/http/nsHttpHandler.cpp 2015-09-17 19:43:17.257423792 +0100
5
--- a/netwerk/protocol/http/nsHttpHandler.cpp
6
+++ b/netwerk/protocol/http/nsHttpHandler.cpp
10
8
, mLegacyAppName("Mozilla")
11
9
, mLegacyAppVersion("5.0")
12
10
, mProduct("Gecko")
16
14
, mCompatFirefoxEnabled(false)
17
15
, mUserAgentIsDirty(true)
18
16
, mAcceptLanguagesIsDirty(true)
20
18
LOG(("> misc = %s\n", mMisc.get()));
21
19
LOG(("> product = %s\n", mProduct.get()));
22
20
LOG(("> product-sub = %s\n", mProductSub.get()));
26
24
LOG(("> app-name = %s\n", mAppName.get()));
27
25
LOG(("> app-version = %s\n", mAppVersion.get()));
28
26
LOG(("> compat-firefox = %s\n", mCompatFirefox.get()));
30
28
mCompatFirefox.Length() +
31
29
mCompatDevice.Length() +
32
30
mDeviceModelId.Length() +
35
33
+#ifdef MOZ_UA_VENDOR
39
37
// Application portion
40
38
mUserAgent.Assign(mLegacyAppName);
43
41
mUserAgent.AppendLiteral("; ");
50
48
if (!mCompatDevice.IsEmpty()) {
51
49
mUserAgent += mCompatDevice;
52
50
mUserAgent.AppendLiteral("; ");
53
Index: firefox-trunk-43.0~a1~hg20150916r262830/netwerk/protocol/http/nsHttpHandler.h
54
===================================================================
55
--- firefox-trunk-43.0~a1~hg20150916r262830.orig/netwerk/protocol/http/nsHttpHandler.h 2015-09-17 19:42:31.429286277 +0100
56
+++ firefox-trunk-43.0~a1~hg20150916r262830/netwerk/protocol/http/nsHttpHandler.h 2015-09-17 19:42:31.369286096 +0100
51
--- a/netwerk/protocol/http/nsHttpHandler.h
52
+++ b/netwerk/protocol/http/nsHttpHandler.h
58
54
// useragent components
59
55
nsCString mLegacyAppName;
60
56
nsCString mLegacyAppVersion;
62
58
nsCString mPlatform;
65
Index: firefox-trunk-43.0~a1~hg20150916r262830/netwerk/protocol/http/Makefile.in
66
===================================================================
67
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
68
+++ firefox-trunk-43.0~a1~hg20150916r262830/netwerk/protocol/http/Makefile.in 2015-09-17 19:42:31.369286096 +0100
70
+# This Source Code Form is subject to the terms of the Mozilla Public
71
+# License, v. 2.0. If a copy of the MPL was not distributed with this
72
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
74
+include $(topsrcdir)/config/rules.mk
77
+DEFINES += -DMOZ_UA_VENDOR=\""$(MOZ_UA_VENDOR)"\"
61
--- a/old-configure.in
62
+++ b/old-configure.in
63
@@ -2185,6 +2185,16 @@
64
MOZ_APP_BASENAME="$WITH_APP_BASENAME"
67
+# Allow someone to add a vendor component to the default user agent string
68
+MOZ_ARG_WITH_STRING(ua-vendor,
69
+[--with-ua-vendor=VENDOR sets MOZ_UA_VENDOR to VENDOR],
70
+WITH_UA_VENDOR=$withval,
73
+if test -n "$WITH_UA_VENDOR" ; then
74
+ MOZ_UA_VENDOR="$WITH_UA_VENDOR"
77
# Special cases where we need to AC_DEFINE something. Also a holdover for apps
78
# that haven't made a confvars.sh yet. Don't add new stuff here, use
81
AC_SUBST(MOZ_APP_DISPLAYNAME)
82
AC_SUBST(MOZ_APP_BASENAME)
83
AC_SUBST(MOZ_APP_VENDOR)
84
+AC_SUBST(MOZ_UA_VENDOR)
85
AC_SUBST(MOZ_APP_PROFILE)
87
AC_SUBST(MOZ_APP_ANDROID_VERSION_CODE)
88
--- a/build/moz.configure/old.configure
89
+++ b/build/moz.configure/old.configure
93
'--with-thumb-interwork',
98
--- a/netwerk/protocol/http/moz.build
99
+++ b/netwerk/protocol/http/moz.build
105
+if CONFIG['MOZ_UA_VENDOR']:
106
+ DEFINES['MOZ_UA_VENDOR'] = '"%s"' % CONFIG['MOZ_UA_VENDOR']