fix HTTPLog panic with no User-Agent
This commit is contained in:
parent
c49084afb0
commit
c63a090569
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -626,6 +626,6 @@ func HTTPLog(next http.Handler) http.Handler {
|
|||
lrw.Status,
|
||||
colour.Reset,
|
||||
elapsed,
|
||||
r.Header["User-Agent"][0])
|
||||
r.Header.Get("User-Agent"))
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue