Call MultipartForm.RemoveAll when request finishes (#19606) (#19607)

This commit is contained in:
wxiaoguang 2022-05-05 22:13:59 +08:00 committed by GitHub
parent 7b18c67ac9
commit 46637b1164
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 0 deletions

View file

@ -288,6 +288,7 @@ func APIContexter() func(http.Handler) http.Handler {
},
Org: &APIOrganization{},
}
defer ctx.Close()
ctx.Req = WithAPIContext(WithContext(req, ctx.Context), &ctx)
ctx.csrf = Csrfer(csrfOpts, ctx.Context)