From c63a090569d6ef8d12743f802b0361e22c4422cd Mon Sep 17 00:00:00 2001 From: ari melody Date: Sat, 16 Aug 2025 22:35:49 +0100 Subject: [PATCH] fix HTTPLog panic with no User-Agent --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 53f2883..edd4c87 100644 --- a/main.go +++ b/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")) }) }