close api response body

This commit is contained in:
Ronmi Ren 2025-01-07 21:41:32 +08:00
commit 1b5ab5659d
2 changed files with 4 additions and 2 deletions

View file

@ -49,6 +49,7 @@ func (f *Forgejo) handle(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
return
}
defer content.Close()
trySet(w.Header(), "Etag", info.ETag)
trySet(w.Header(), "Last-Modified", info.LastModified)