MCPcopy Create free account
hub / github.com/mpolden/echoip / cliMatcher

Function cliMatcher

http/http.go:393–400  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

391}
392
393func cliMatcher(r *http.Request) bool {
394 ua := useragent.Parse(r.UserAgent())
395 switch ua.Product {
396 case "curl", "HTTPie", "httpie-go", "Wget", "fetch libfetch", "Go", "Go-http-client", "ddclient", "Mikrotik", "xh":
397 return true
398 }
399 return false
400}
401
402type appHandler func(http.ResponseWriter, *http.Request) *appError
403

Callers 1

TestCLIMatcherFunction · 0.85

Calls 1

ParseFunction · 0.92

Tested by 1

TestCLIMatcherFunction · 0.68