mirror of
https://github.com/mpolden/echoip.git
synced 2025-07-17 14:33:30 +02:00
Handle more invalid user agents
This commit is contained in:
@ -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"}},
|
||||
|
Reference in New Issue
Block a user