varnishcache / varnish-devicedetect

VCL based device detection for Varnish Cache.
Other
299 stars 88 forks source link

Fix for incorrect detection of Opera Mobile on Android #8

Closed jacobcoens closed 10 years ago

jacobcoens commented 11 years ago

Opera Mobile on Android is incorrectly detected as Android Tablet.

An example user agent string is "Opera/9.80 (Android 4.1.2; Linux; Opera Mobi/ADR-1301080958) Presto/2.11.355 Version/12.10", which would result in successfully passing the "(?i)android" regex, before the "Opera Mobi" regex is checked.

To fix this, I've moved the "Opera Mobi" regex up to just before the check for Android Tablets.

As already mentioned in the comment, this was a false positive for Android Tablet.

lkarsten commented 10 years ago

Imported now. Sorry for the late response.

lkarsten commented 10 years ago

and thanks for contributing! :)