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

A mobile user agent is reported as a non-mobile user agent. #75

@gaojunhuicavon

Description

@gaojunhuicavon

Description

The following ua containing the keyword iPhone wants to be reported as a mobile ua:

Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Jike/7.6.7 /sa-sdk-ios/sensors-verify/track.midway.run?jike

Steps to reproduce

import "github.com/mssola/user_agent"

func main() {
	ua := "Mozilla/5.0 (iPhone; CPU iPhone OS 13_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Jike/7.6.7 /sa-sdk-ios/sensors-verify/track.midway.run?jike"
	user_agent.New(ua).Mobile() // True is expected, but false is got.
}

user_agent version

v0.5.2

Go version and interpreter

go version go1.14.2 darwin/amd64

Operating system

macOS Mojave 10.14.6(18G6032)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions