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

OS varies depending on User-agent HTML encoding #569

Open
wilskong opened this issue Jan 23, 2024 · 0 comments
Open

OS varies depending on User-agent HTML encoding #569

wilskong opened this issue Jan 23, 2024 · 0 comments

Comments

@wilskong
Copy link

When looking at the following user-agent:

Mozilla/5.0%20(Linux;%20Android%209.0;%20Build/PI)%20AppleWebKit/537.36%20(KHTML,%20like%20Gecko)%20Chrome/92.0.4515.0%20Safari/537.36%20CrKey/1.56.500000%20DeviceType/AndroidTV

The os.string is accurately recognized as "Chromecast 1.56.500000" and the os.family is recognized as "Chromecast". This string is currently encoded with HTML encoding which generally is replacing whitespaces with %20

When looking at the same user-agent but in a decoded format:

Mozilla/5.0 (Linux; Android 9.0; Build/PI) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.0 Safari/537.36 CrKey/1.56.500000 DeviceType/AndroidTV

The os.string is instead read as "Android 9.0.0" and the os.family returned is "Android". The two should be in sync at the least where it should return "Chromecast"

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

No branches or pull requests

2 participants
@wilskong and others