On 2014-02-12 14:24, Alex wrote: > On Sunday, January 5, 2014 5:44:50 PM UTC, Matt Brubeck wrote: >> On 1/4/2014 1:31 PM, Alex wrote: >> >>> I've tried looking for a straightforward answer but the MDN doesn't help >>> much on the matter. The only way I know of is using the useragent.override >>> on about:config, but that's cumbersome and isn't very dynamic. >> >> >> >> There are a number of add-ons that provide alternate ways to set the >> >> User-Agent header: >> >> https://addons.mozilla.org/en-US/firefox/search/?q=user+agent > > I still haven't managed to find where the user agent is defined in the source > code. So is it not possible to modify the user agent before building Firefox? >
That's because it isn't defined. It is generated here: https://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/http/nsHttpHandler.cpp#594 If you are building Firefox you can change nsHttpHandler::BuildUserAgent(); otherwise it is useragent.override, or an add-on. _______________________________________________ dev-builds mailing list dev-builds@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-builds