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

is it correct parsing #47

Open
ilia-kob opened this issue Sep 15, 2024 · 1 comment
Open

is it correct parsing #47

ilia-kob opened this issue Sep 15, 2024 · 1 comment

Comments

@ilia-kob
Copy link

the following code

uaString := "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko)" // macbook telegram
ua := useragent.Parse(uaString)
fmt.Printf("%+v\n", ua)

produces output:

{VersionNo:{Major:0 Minor:0 Patch:0} OSVersionNo:{Major:10 Minor:15 Patch:7} URL: String:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Name:Intel Mac OS X 10_15_7 Version: OS:macOS OSVersion:10.15.7 Device: Mobile:false Tablet:false Desktop:true Bot:false}

It seems strange that Name:"Intel Mac OS X 10_15_7" whereas VersionNo:{Major:0 Minor:0 Patch:0} .
I mean the Name seems should include the browser name only (the brand) without version. if it is not detectable probably "Unknown" is the good value, but in this particular case I would say it should be something like "Apple WebView".

So my question is - what is concept behind the Name attribute, and does it align with the example I provided ?

@mileusna
Copy link
Owner

Indees, AppleWebKit should be selected as Name with version 605.1.15.
OS part is OK with macOS and 10.15.7 as version.

Thank you.

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