summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Borg <jakob@kastelo.net>2023-02-22 12:22:52 +0100
committerJakob Borg <jakob@kastelo.net>2023-02-22 12:22:52 +0100
commitcbec697e5fc054fe7d575ec171276f4b030f8cee (patch)
tree0c2d249af1d7328a9034a4b4dcd03b7bc8ce547e
parent8991ecf4448f7b7f720401777fa5eb6bac472751 (diff)
cmd/stupgrades: Cache should apply to HEAD as well as GET
-rw-r--r--lib/httpcache/httpcache.go2
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
}