Skip to content

[embedlite-components] Add support for site specific UA override. Contributes to JB#34904#95

Open
rainemak wants to merge 1 commit intotmeshkova:masterfrom
rainemak:siteSpecificOverride
Open

[embedlite-components] Add support for site specific UA override. Contributes to JB#34904#95
rainemak wants to merge 1 commit intotmeshkova:masterfrom
rainemak:siteSpecificOverride

Conversation

@rainemak
Copy link
Contributor

This makes possible to use general.useragent.override.* overrides
with simple replace syntax given that complex override is not applied.

Instantiation of the UserAgent is deferred a bit so that we do not
end up initializing UserAgentOverrides before general.useragent.override
is applied. As UserAgent was initialized on that application startup,
the simple hash separated user agent fixing did not work. This happened
because nsIHttpProtocolHandler was not yet aware of the override.
Thus, causing UserAgentOverrides to fail to replace ua.

@rainemak
Copy link
Contributor Author

This also fixed navigator.userAgent when user agent overriding is implied.

…tributes to JB#34904

This makes possible to use general.useragent.override.* overrides
with simple replace syntax given that complex override is not applied.

Instantiation of the UserAgent is deferred a bit so that we do not
end up initializing UserAgentOverrides before general.useragent.override
is applied. As UserAgent was initialized on that application startup,
the simple hash separated user agent fixing did not work. This happened
because nsIHttpProtocolHandler was not yet aware of the override.
Thus, causing UserAgentOverrides to fail to replace ua.
@rainemak rainemak force-pushed the siteSpecificOverride branch from 03c48ce to a353298 Compare April 20, 2016 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments