Closed Bug 1911306 Opened 1 year ago Closed 1 year ago

general.useragent.compatMode.firefox doesn't seem to have any effect

Categories

(Core :: Networking: HTTP, defect)

Firefox 128
defect

Tracking

()

RESOLVED INVALID

People

(Reporter: regspam, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0

Steps to reproduce:

Changing the "general.useragent.compatMode.firefox" preference doesn't change the the "User-Agent" request header, while as far as I understand it should.

Component: Untriaged → Networking: HTTP
Product: Firefox → Core

That pref does nothing in Firefox. It is only supposed to change the UA to be compatible with Firefox for other applications - like Thunderbird.
Here's the code that handles that. You'll notice that isFirefox will already be true.

https://searchfox.org/mozilla-central/rev/61ef38e43f73bc6456013bd3a1c66693727ac4c6/netwerk/protocol/http/nsHttpHandler.cpp#899-904

bool isFirefox = mAppName.EqualsLiteral("Firefox");
if (isFirefox || mCompatFirefoxEnabled) {
  // "Firefox/x.y" (compatibility) app token
  mUserAgent += ' ';
  mUserAgent += mCompatFirefox;
}
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.