Handle more invalid user agents

This commit is contained in:
Martin Polden
2017-05-28 13:57:48 +02:00
parent 0cd84ada1e
commit f644b0b488
2 changed files with 3 additions and 1 deletions

View File

@ -10,6 +10,8 @@ func TestParse(t *testing.T) {
out UserAgent
}{
{"", UserAgent{}},
{"curl/", UserAgent{Product: "curl"}},
{"curl/foo", UserAgent{Product: "curl", Comment: "foo"}},
{"curl/7.26.0", UserAgent{Product: "curl", Version: "7.26.0"}},
{"Wget/1.13.4 (linux-gnu)", UserAgent{Product: "Wget", Version: "1.13.4", Comment: "(linux-gnu)"}},
{"Wget", UserAgent{Product: "Wget"}},