Skip to content

Commit

Permalink
[log] Unescapes upstream address url in access log
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyanliu authored and Jack47 committed Dec 23, 2017
1 parent b68da0e commit aaef767
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/logger/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ func HTTPAccess(req *http.Request, code int, bodyBytesSent int64,

if upstreamAddr == "" {
upstreamAddr = "-"
} else {
if addr, err := url.QueryUnescape(upstreamAddr); err == nil {
upstreamAddr = addr
}
}

line := fmt.Sprintf(
Expand Down

0 comments on commit aaef767

Please sign in to comment.