mirror of
https://github.com/mpolden/echoip.git
synced 2025-06-29 14:17:50 +02:00
add cli detection for httpie-go
This commit is contained in:
@ -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
|
||||
|
@ -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},
|
||||
|
Reference in New Issue
Block a user