cmd/stupgrades: Cache should apply to HEAD as well as GET

This commit is contained in:
Jakob Borg 2023-02-22 12:22:52 +01:00
parent 8991ecf444
commit cbec697e5f

View File

@ -79,7 +79,7 @@ func (r *responseRecorder) Header() http.Header {
} }
func (s *SinglePathCache) ServeHTTP(w http.ResponseWriter, r *http.Request) { 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) s.next.ServeHTTP(w, r)
return return
} }