From 46b23ee3a9f196944ace0bc9f7ce85095f675d44 Mon Sep 17 00:00:00 2001 From: Azareal Date: Sat, 7 Mar 2020 14:20:42 +1000 Subject: [PATCH] log unknown uas --- gen_router.go | 2 ++ router_gen/main.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gen_router.go b/gen_router.go index 3bd7f95e..6448f6f8 100644 --- a/gen_router.go +++ b/gen_router.go @@ -1063,6 +1063,8 @@ func (r *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) { prepend += strconv.Itoa(int(char)) + " " } r.DumpRequest(req,"Blank UA: " + prepend) + } else { + r.requestLogger.Print("unknown ua: ", c.SanitiseSingleLine(ua)) } } else { co.AgentViewCounter.Bump(agentMapEnum[agent]) diff --git a/router_gen/main.go b/router_gen/main.go index 7807cf09..e0468d8f 100644 --- a/router_gen/main.go +++ b/router_gen/main.go @@ -782,6 +782,8 @@ func (r *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) { prepend += strconv.Itoa(int(char)) + " " } r.DumpRequest(req,"Blank UA: " + prepend) + } else { + r.requestLogger.Print("unknown ua: ", c.SanitiseSingleLine(ua)) } } else { co.AgentViewCounter.Bump(agentMapEnum[agent])