Add UA detection for modern iterations of Firefox Mobile. #52

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Member

mythmon commented Aug 21, 2012

Note that this changes how versions and browsers are detected. In particular it relies on the Firefox desktop regex to parse the version number, and then the browser (being mobile) is set by the mobile regex, which doesn't parse a version. Order is important, and is consistent. This could bite us in the future, if we were to work more on this.

Add UA detection for modern iterations of Firefox Mobile.
Note that this changes how versions and browsers are detected. In
particular it relies on the Firefox desktop regex to parse the
version number, and then the browser (being mobile) is set by the
mobile regex, which doesn't parse a version. Order is important, and
is consistent. This could bite us in the future.
try:
version = Version(match.group(2))
+ detected['version'] = str(version)
except:
@willkg

willkg Aug 21, 2012

Member

Total yuck. I'm on the fence about whether to make this suck less or not.

Member

willkg commented Aug 21, 2012

This passes the existing input tests (assuming I'm running them correctly).

@mythmon wrote up a set of tests to make sure they work with the user-agent strings we're testing with in fjord and it seems fine there, too.

I think that alleviates most of the risks. We'll find out more when we push to production. r+

Member

willkg commented Aug 21, 2012

Landed in 7591485

@willkg willkg closed this Aug 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment