mirror of https://github.com/mpolden/echoip
parent
3df93d15a7
commit
6e1ad53a3b
|
@ -19,7 +19,7 @@ import (
|
|||
const APPLICATION_JSON = "application/json"
|
||||
|
||||
var USER_AGENT_RE = regexp.MustCompile(
|
||||
`^(?:curl|Wget|fetch\slibfetch|Go-http-client|HTTPie)\/.*|Go\s1\.1\spackage\shttp$`,
|
||||
`^(?:curl|Wget|fetch\slibfetch|ddclient|Go-http-client|HTTPie)\/.*|Go\s1\.1\spackage\shttp$`,
|
||||
)
|
||||
|
||||
type API struct {
|
||||
|
|
|
@ -151,6 +151,7 @@ func TestCLIMatcher(t *testing.T) {
|
|||
{"Go 1.1 package http", true},
|
||||
{"Go-http-client/1.1", true},
|
||||
{"Go-http-client/2.0", true},
|
||||
{"ddclient/3.8.3", true},
|
||||
{browserUserAgent, false},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
|
|
Loading…
Reference in New Issue