Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Firefox on Win XP incorrectly marked as Mobile #15

Closed
connor-prodege opened this issue Aug 20, 2014 · 2 comments
Closed

Firefox on Win XP incorrectly marked as Mobile #15

connor-prodege opened this issue Aug 20, 2014 · 2 comments

Comments

@connor-prodege
Copy link

Hi,

We love this library and are currently using this in production. we detected a bug today in the parsing of firefox's user agent on windows XP:

userAgentXPFF := "Mozilla/5.0 (Windows NT 5.2; rv:31.0) Gecko/20100101 Firefox/31.0"
parsed := user_agent.New(userAgentXPFF)
fmt.Println(parsed.Mobile())

will print true.

i've tracked down the issue to this line:

} else if len(comment) < 3 {
    p.mobile = true
    p.os = "FirefoxOS"

https://github.com/mssola/user_agent/blob/master/operating_systems.go#L116

Please let me know if this issue can be fixed.

Thanks! & great work!

@mssola mssola closed this as completed in 7edd344 Aug 21, 2014
@mssola
Copy link
Owner

mssola commented Aug 21, 2014

Thanks for spotting this! :)

@connor-prodege
Copy link
Author

Thanks, works great!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants