$ parse_user_agent("curl/8.7.1")
{ "browser": { "family": "HTTP Library", "version": "curl" }, "device": { "category": "misc" }, "os": { "family": null, "version": null } }
$ parse_user_agent("curl/8.7.1", mode: "enriched")
{ "browser": { "family": "curl", "major": "8", "minor": "7", "patch": "1", "version": "curl" }, "device": { "brand": null, "category": "misc", "family": null, "model": null }, "os": { "family": null, "major": null, "minor": null, "patch": null, "patch_minor": null, "version": null } }
parse_user_agent("curl/8.7.1")
parse_user_agent("curl/8.7.1", mode: "enriched")
A note for the community
Problem
I find it rather confusing for
parse_user_agent("curl/8.7.1")and especially forparse_user_agent("curl/8.7.1", mode: "enriched")to setbrowser.versionto"curl"instead of"8.7.1",despite correctly extracting major/minor/patch versions in the enriched mode.
is this intentional or a bug?
VRL Program
VRL and/or Vector Version
0.53.0
Debug Output
Example
https://playground.vrl.dev/?state=eyJwcm9ncmFtIjoiLnVzZXJfYWdlbnQuZmFzdCA9IHBhcnNlX3VzZXJfYWdlbnQhKC51c2VyX2FnZW50X3N0cmluZylcbi51c2VyX2FnZW50LmVucmljaGVkID0gcGFyc2VfdXNlcl9hZ2VudCEoLnVzZXJfYWdlbnRfc3RyaW5nLCBtb2RlOiBcImVucmljaGVkXCIpXG4udXNlcl9hZ2VudC5yZWxpYWJsZSA9IHBhcnNlX3VzZXJfYWdlbnQhKC51c2VyX2FnZW50X3N0cmluZywgbW9kZTogXCJyZWxpYWJsZVwiKSIsImV2ZW50Ijp7InVzZXJfYWdlbnRfc3RyaW5nIjoiY3VybC84LjcuMSJ9LCJpc19qc29ubCI6ZmFsc2UsImVycm9yIjpudWxsfQ%3D%3D
Additional Context
No response
References
No response