blueconic / browscap-java

A blazingly fast and memory efficient (thread-safe) Java client on top of the BrowsCap CSV source files.
MIT License
193 stars 37 forks source link

IE9 detection fails when in emulation mode #8

Closed nyon closed 6 years ago

nyon commented 6 years ago

When using this library to detect for different Internet Explorer version, it fails for an emulated Internet explorer 9. A real Internet Explorer 9 would send the following user agent:

Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)

while an emulated one sends the following

Mozilla/5.0(compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)

Note the missing space between Mozilla/5.0 and (compatible; ....

I worked around it by replacing Mozilla/5.0(compatible with Mozilla/5.0 (compatible, but perhaps this could be fixed in a better way in your library (if you want to fix it at all).

paulrutter commented 6 years ago

Hi @nyon,

This library follows the BrowsCap.org source files; we do not post-process any of the data. See http://browscap.org/ua-lookup; the output of that page is what this library will return as well.

If you want this fixed, please report it to the BrowsCap github https://github.com/browscap/browscap/issues.

Thanks!