1
0
Fork 0
forked from forgejo/forgejo

Revert "[GITEA] Use maintained gziphandler"

This reverts commit dd2414f226.
This commit is contained in:
Earl Warren 2024-01-16 14:08:31 +00:00
parent fef19bcf94
commit 0b872a403d
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
6 changed files with 21 additions and 23 deletions

View file

@ -147,16 +147,6 @@ func toHandlerProvider(handler any) func(next http.Handler) http.Handler {
}
}
if hp, ok := handler.(func(next http.Handler) http.HandlerFunc); ok {
return func(next http.Handler) http.Handler {
h := hp(next) // this handle could be dynamically generated, so we can't use it for debug info
return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) {
routing.UpdateFuncInfo(req.Context(), funcInfo)
h.ServeHTTP(resp, req)
})
}
}
provider := func(next http.Handler) http.Handler {
return http.HandlerFunc(func(respOrig http.ResponseWriter, req *http.Request) {
// wrap the response writer to check whether the response has been written