diff options
author | Chloe Kudryavtsev <toast@toast.cafe> | 2020-07-24 01:41:07 +0300 |
---|---|---|
committer | Chloe Kudryavtsev <toast@toast.cafe> | 2020-07-24 01:41:07 +0300 |
commit | 7ad9af3b155d1c16d118c74cd534dfb9acc1c9d3 (patch) | |
tree | dfc8255fde9dc4e9d1901b28e2404b46f77b488f /http | |
parent | eb6d5909904b10decafcf53a31458c6c171b0523 (diff) |
add cli detection for httpie-go
Diffstat (limited to 'http')
-rw-r--r-- | http/http.go | 2 | ||||
-rw-r--r-- | http/http_test.go | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/http/http.go b/http/http.go index b5d275d..2b23cf4 100644 --- a/http/http.go +++ b/http/http.go @@ -317,7 +317,7 @@ func NotFoundHandler(w http.ResponseWriter, r *http.Request) *appError { func cliMatcher(r *http.Request) bool { ua := useragent.Parse(r.UserAgent()) switch ua.Product { - case "curl", "HTTPie", "Wget", "fetch libfetch", "Go", "Go-http-client", "ddclient", "Mikrotik": + case "curl", "HTTPie", "httpie-go", "Wget", "fetch libfetch", "Go", "Go-http-client", "ddclient", "Mikrotik": return true } return false diff --git a/http/http_test.go b/http/http_test.go index 00e58a4..61c1d72 100644 --- a/http/http_test.go +++ b/http/http_test.go @@ -214,6 +214,7 @@ func TestCLIMatcher(t *testing.T) { {"Wget", true}, {"fetch libfetch/2.0", true}, {"HTTPie/0.9.3", true}, + {"httpie-go/0.6.0", true}, {"Go 1.1 package http", true}, {"Go-http-client/1.1", true}, {"Go-http-client/2.0", true}, |