Skip to content

Commit

Permalink
fix(webdav): HttpServe memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
Mmx233 committed Sep 1, 2024
1 parent 426502c commit b2791bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/net/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ func ServeHTTP(w http.ResponseWriter, r *http.Request, name string, modTime time
pw.Close()
}()
}
defer sendContent.Close()

w.Header().Set("Accept-Ranges", "bytes")
if w.Header().Get("Content-Encoding") == "" {
Expand All @@ -192,7 +193,6 @@ func ServeHTTP(w http.ResponseWriter, r *http.Request, name string, modTime time
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}
//defer sendContent.Close()
}
func ProcessHeader(origin, override http.Header) http.Header {
result := http.Header{}
Expand Down

0 comments on commit b2791bd

Please sign in to comment.