This repository was archived by the owner on Sep 30, 2024. It is now read-only.
File tree 1 file changed +32
-0
lines changed
src/netwerk/protocol/http
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp
2
+ index da2c5fa31cfa8e87cf007e8a0e03a526f3646ed7..1042b350cb0e63fd0017da4a722b587a2d380d8f 100644
3
+ --- a/netwerk/protocol/http/nsHttpHandler.cpp
4
+ +++ b/netwerk/protocol/http/nsHttpHandler.cpp
5
+ @@ -826,19 +826,14 @@ void nsHttpHandler::BuildUserAgent() {
6
+ mUserAgent += '/';
7
+ mUserAgent += mProductSub;
8
+
9
+ - bool isFirefox = mAppName.EqualsLiteral("Firefox");
10
+ - if (isFirefox || mCompatFirefoxEnabled) {
11
+ - // "Firefox/x.y" (compatibility) app token
12
+ - mUserAgent += ' ';
13
+ - mUserAgent += mCompatFirefox;
14
+ - }
15
+ - if (!isFirefox) {
16
+ - // App portion
17
+ - mUserAgent += ' ';
18
+ - mUserAgent += mAppName;
19
+ - mUserAgent += '/';
20
+ - mUserAgent += mAppVersion;
21
+ - }
22
+ + // By removing the isFirefox variable here, we gain the Firefox user agent,
23
+ + // which reduces the fingerprinting footprint and makes the browser function
24
+ + // correctly on mozilla sites like addons.mozilla.org. It also provides an
25
+ + // insignificant performance boost because we are removing a branching section
26
+ +
27
+ + // "Firefox/x.y" (compatibility) app token
28
+ + mUserAgent += ' ';
29
+ + mUserAgent += mCompatFirefox;
30
+ }
31
+
32
+ #ifdef XP_WIN
You can’t perform that action at this time.
0 commit comments