0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-22 07:44:18 +01:00

Fix route wrap (#18360)

This commit is contained in:
wxiaoguang 2022-01-22 23:05:22 +08:00 committed by GitHub
parent f91092453e
commit 5ff899d5ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -93,6 +93,9 @@ func convertHandler(handler interface{}) wrappedHandlerFunc {
}
routing.UpdateFuncInfo(req.Context(), funcInfo)
t(next).ServeHTTP(resp, req)
if r, ok := resp.(context.ResponseWriter); ok && r.Status() > 0 {
done = true
}
return
}
default: