Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible problem with the scoring #6

Open
harrineiman opened this issue Apr 7, 2017 · 3 comments · May be fixed by #10
Open

Possible problem with the scoring #6

harrineiman opened this issue Apr 7, 2017 · 3 comments · May be fixed by #10
Labels

Comments

@harrineiman
Copy link

Hi!

If I understand the code correctly, the scoring algorithm is just based on a line number and it will prefer smaller numbers, i.e. it seems to assume that more precise matches are higher up in the browscap.ini file.

This is not always the case - here's an example from the latest 6022 version with the user agent;
Mozilla/5.0 (Linux; Android 6.0; Infinix HOT 4 Build/MRA58K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.132 Mobile Safari/537.36

The correct match (as it's returned from the browscap.org/ua-lookup page) would be:
mozilla/5.0 (*linux*android?6.0*) applewebkit* (*khtml*like*gecko*) chrome/57.*safari/*

...but bgo finds this instead (the platform version is not matched):
Mozilla/5.0 (*Linux*Android*) applewebkit* (*khtml*like*gecko*) Chrome/57.*Safari/*

It is also possible that I'm misunderstanding something, in which case I'm sorry for causing a fuss.

Cheers!

@digitalcrab digitalcrab added the bug label Apr 7, 2017
@digitalcrab
Copy link
Owner

Hello, thanks you for the information. I will take a look as soon as possible.

@deepakdalakoti
Copy link

Any updates on this? I am facing the same problem.

@digitalcrab
Copy link
Owner

Hello guys, sorry no updates for now. Hope next week I'll have more time.

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

Successfully merging a pull request may close this issue.

3 participants