Fix the false positives with IE11 and Firefox.

Moved some noisy things to SuperDebug.
This commit is contained in:
Azareal 2018-02-04 09:33:04 +00:00
parent 2455e951aa
commit e56e7cd467
3 changed files with 9 additions and 9 deletions

View File

@ -595,7 +595,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
for index, item := range ua { for index, item := range ua {
if (item > 64 && item < 91) || (item > 96 && item < 123) { if (item > 64 && item < 91) || (item > 96 && item < 123) {
buffer = append(buffer, item) buffer = append(buffer, item)
} else if item == ' ' || item == '(' || item == ')' || item == '-' || (item > 47 && item < 58) || item == '_' || item == ';' || item == '.' || item == '+' || (item == ':' && runeEquals(buffer,[]rune("http"))) || item == ',' || item == '/' { } else if item == ' ' || item == '(' || item == ')' || item == '-' || (item > 47 && item < 58) || item == '_' || item == ';' || item == '.' || item == '+' || (item == ':' && (runeEquals(buffer,[]rune("http")) || runeEquals(buffer,[]rune("rv")))) || item == ',' || item == '/' {
if len(buffer) != 0 { if len(buffer) != 0 {
items = append(items, string(buffer)) items = append(items, string(buffer))
indices = append(indices, index - 1) indices = append(indices, index - 1)

View File

@ -801,7 +801,7 @@ func routePanelAnalyticsAgentViews(w http.ResponseWriter, r *http.Request, user
} }
var unixCreatedAt = createdAt.Unix() var unixCreatedAt = createdAt.Unix()
if common.Dev.DebugMode { if common.Dev.SuperDebug {
log.Print("count: ", count) log.Print("count: ", count)
log.Print("createdAt: ", createdAt) log.Print("createdAt: ", createdAt)
log.Print("unixCreatedAt: ", unixCreatedAt) log.Print("unixCreatedAt: ", unixCreatedAt)
@ -883,7 +883,7 @@ func routePanelAnalyticsSystemViews(w http.ResponseWriter, r *http.Request, user
} }
var unixCreatedAt = createdAt.Unix() var unixCreatedAt = createdAt.Unix()
if common.Dev.DebugMode { if common.Dev.SuperDebug {
log.Print("count: ", count) log.Print("count: ", count)
log.Print("createdAt: ", createdAt) log.Print("createdAt: ", createdAt)
log.Print("unixCreatedAt: ", unixCreatedAt) log.Print("unixCreatedAt: ", unixCreatedAt)
@ -963,7 +963,7 @@ func routePanelAnalyticsTopics(w http.ResponseWriter, r *http.Request, user comm
} }
var unixCreatedAt = createdAt.Unix() var unixCreatedAt = createdAt.Unix()
if common.Dev.DebugMode { if common.Dev.SuperDebug {
log.Print("count: ", count) log.Print("count: ", count)
log.Print("createdAt: ", createdAt) log.Print("createdAt: ", createdAt)
log.Print("unixCreatedAt: ", unixCreatedAt) log.Print("unixCreatedAt: ", unixCreatedAt)
@ -1039,7 +1039,7 @@ func routePanelAnalyticsPosts(w http.ResponseWriter, r *http.Request, user commo
} }
var unixCreatedAt = createdAt.Unix() var unixCreatedAt = createdAt.Unix()
if common.Dev.DebugMode { if common.Dev.SuperDebug {
log.Print("count: ", count) log.Print("count: ", count)
log.Print("createdAt: ", createdAt) log.Print("createdAt: ", createdAt)
log.Print("unixCreatedAt: ", unixCreatedAt) log.Print("unixCreatedAt: ", unixCreatedAt)
@ -1096,7 +1096,7 @@ func routePanelAnalyticsRoutes(w http.ResponseWriter, r *http.Request, user comm
return common.InternalError(err, w, r) return common.InternalError(err, w, r)
} }
if common.Dev.DebugMode { if common.Dev.SuperDebug {
log.Print("count: ", count) log.Print("count: ", count)
log.Print("route: ", route) log.Print("route: ", route)
} }
@ -1147,7 +1147,7 @@ func routePanelAnalyticsAgents(w http.ResponseWriter, r *http.Request, user comm
return common.InternalError(err, w, r) return common.InternalError(err, w, r)
} }
if common.Dev.DebugMode { if common.Dev.SuperDebug {
log.Print("count: ", count) log.Print("count: ", count)
log.Print("agent: ", agent) log.Print("agent: ", agent)
} }
@ -1203,7 +1203,7 @@ func routePanelAnalyticsSystems(w http.ResponseWriter, r *http.Request, user com
return common.InternalError(err, w, r) return common.InternalError(err, w, r)
} }
if common.Dev.DebugMode { if common.Dev.SuperDebug {
log.Print("count: ", count) log.Print("count: ", count)
log.Print("system: ", system) log.Print("system: ", system)
} }

View File

@ -460,7 +460,7 @@ func (router *GenRouter) ServeHTTP(w http.ResponseWriter, req *http.Request) {
for index, item := range ua { for index, item := range ua {
if (item > 64 && item < 91) || (item > 96 && item < 123) { if (item > 64 && item < 91) || (item > 96 && item < 123) {
buffer = append(buffer, item) buffer = append(buffer, item)
} else if item == ' ' || item == '(' || item == ')' || item == '-' || (item > 47 && item < 58) || item == '_' || item == ';' || item == '.' || item == '+' || (item == ':' && runeEquals(buffer,[]rune("http"))) || item == ',' || item == '/' { } else if item == ' ' || item == '(' || item == ')' || item == '-' || (item > 47 && item < 58) || item == '_' || item == ';' || item == '.' || item == '+' || (item == ':' && (runeEquals(buffer,[]rune("http")) || runeEquals(buffer,[]rune("rv")))) || item == ',' || item == '/' {
if len(buffer) != 0 { if len(buffer) != 0 {
items = append(items, string(buffer)) items = append(items, string(buffer))
indices = append(indices, index - 1) indices = append(indices, index - 1)