ucla-oarc-mobile / mwf

UCLA Mobile Web Framework
http://mwf.ucla.edu
Other
86 stars 25 forks source link

DTS: Symbian OS detection unreliable #112

Closed Trott closed 12 years ago

Trott commented 12 years ago

The mwf.userAgent.getOSVersion() code expects that if a user agent string has "SymbianOS" in it, that it will be followed by a version number terminated with a semi-colon. However, looking at http://www.zytrax.com/tech/web/mobile_ids.html, many user agent strings will fail because they do not have the semi-colon. This can probably be remedied by using a regexp to detect a wordbreak.

Trott commented 12 years ago

Additionally, if the search for "symbianos/" fails, the code tries "symbian/" but I can't find any user agent strings (at the above URL) that have that form. Do we know of any? Or should that code be removed?

ebollens commented 12 years ago

Zytrax was the primary location I was looking. Also referred to ucla.edu's Google Analytics, though, and that listed some with symbian/. Regex should be able to detect this, yes? I'm horrible at regex though :-\

Trott commented 12 years ago

Regex implemented in 4e22c8547b723be213530a80d7092adba18483d5 and string mismatch (that causes there to be blocks of code that can never fire) fixed in 7b4fb130239cebb15cd3d4bf159e6a441e9e645c.