From 2e548aa9260fbe099aa7b86e26a696383d939b3c Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 24 Oct 2021 20:38:42 +0300 Subject: [PATCH] Seems there is not problems with HEAD --- handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler.go b/handler.go index 6fa1d35..52d9a10 100644 --- a/handler.go +++ b/handler.go @@ -156,7 +156,7 @@ func (h Handler) Handle( return } - if !(r.Method == "" || r.Method == http.MethodGet) { + if !(r.Method == "" || r.Method == http.MethodGet || r.Method == http.MethodHead) { fmt.Printf("%s %s \"%s %+q %s\" %d %s\"%s\"\n", r.RemoteAddr, host, r.Method, PathWithQuery(r.URL), r.Proto, http.StatusMethodNotAllowed, -- 2.44.0