Add support for ddclient

Fixes #16
This commit is contained in:
Martin Polden 2016-05-26 21:36:23 +02:00
parent 3df93d15a7
commit 6e1ad53a3b
2 changed files with 2 additions and 1 deletions

View File

@ -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 {

View File

@ -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 {