diff options
author | Jakob Borg <jakob@kastelo.net> | 2023-02-22 12:22:52 +0100 |
---|---|---|
committer | Jakob Borg <jakob@kastelo.net> | 2023-02-22 12:22:52 +0100 |
commit | cbec697e5fc054fe7d575ec171276f4b030f8cee (patch) | |
tree | 0c2d249af1d7328a9034a4b4dcd03b7bc8ce547e | |
parent | 8991ecf4448f7b7f720401777fa5eb6bac472751 (diff) |
cmd/stupgrades: Cache should apply to HEAD as well as GET
-rw-r--r-- | lib/httpcache/httpcache.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/httpcache/httpcache.go b/lib/httpcache/httpcache.go index f3339192bc..e8e442dc11 100644 --- a/lib/httpcache/httpcache.go +++ b/lib/httpcache/httpcache.go @@ -79,7 +79,7 @@ func (r *responseRecorder) Header() http.Header { } func (s *SinglePathCache) ServeHTTP(w http.ResponseWriter, r *http.Request) { - if r.Method != http.MethodGet { + if r.Method != http.MethodGet && r.Method != http.MethodHead { s.next.ServeHTTP(w, r) return } |