Closed Bug 963592 Opened 8 years ago Closed 8 years ago
[b2g] user agent overrides not working correctly
Recently I was trying to add a user agent override for a site in order to demonstrate to the developer that it would work on fxos. It appears, though, that maybe the user agent overrides are not working correctly. To see the problem: 1) Append the following in gecko's b2g/app/ua-updates.json.in: "whatsmyuseragent.com": "\\(Mobile#(Android; Mobile" 2) Flash gecko on the device. 3) Run make reset-gaia to force the immediate use of the ua-updates.json file. 4) Navigate to whatsmyuseragent.com in the device browser. When I do this I see: Your user Agent String is: \(Mobile(Android; Mobile It seems we're not actually applied a regex style substitution from this file like we did in v1.1. Instead the contents of ua-updates.json entries simply replace the standard user agent. Nom'ing for 1.3 since this seems like a serious problem.
OS: Windows 8.1 → Gonk (Firefox OS)
Hardware: x86_64 → ARM
Jim, do you have any idea what is going on here?
Looks like regex replacement is not being done for updates from ua-update.json. Should be a simple fix.
Assignee: nobody → nchen
Status: NEW → ASSIGNED
By the way, I saw this on a v1.2 keon as well.
This patch moves override replacement to its own function and calls the function for each override in the updated overrides list. The patch also adds a test for partial overrides.
Attachment #8366087 - Flags: review?(fabrice)
Attachment #8366087 - Flags: review?(fabrice) → review+
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3 C3/1.4 S3(31jan)
You need to log in before you can comment on or make changes to this bug.