log unknown uas

This commit is contained in:
Azareal 2020-03-07 14:20:42 +10:00
parent b1014d5647
commit 46b23ee3a9
2 changed files with 4 additions and 0 deletions

View File

@ -1063,6 +1063,8 @@ func (r *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
prepend += strconv.Itoa(int(char)) + " " prepend += strconv.Itoa(int(char)) + " "
} }
r.DumpRequest(req,"Blank UA: " + prepend) r.DumpRequest(req,"Blank UA: " + prepend)
} else {
r.requestLogger.Print("unknown ua: ", c.SanitiseSingleLine(ua))
} }
} else { } else {
co.AgentViewCounter.Bump(agentMapEnum[agent]) co.AgentViewCounter.Bump(agentMapEnum[agent])

View File

@ -782,6 +782,8 @@ func (r *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
prepend += strconv.Itoa(int(char)) + " " prepend += strconv.Itoa(int(char)) + " "
} }
r.DumpRequest(req,"Blank UA: " + prepend) r.DumpRequest(req,"Blank UA: " + prepend)
} else {
r.requestLogger.Print("unknown ua: ", c.SanitiseSingleLine(ua))
} }
} else { } else {
co.AgentViewCounter.Bump(agentMapEnum[agent]) co.AgentViewCounter.Bump(agentMapEnum[agent])