Skip to content

Commit

Permalink
Fix route wrap (go-gitea#18360)
Browse files Browse the repository at this point in the history
  • Loading branch information
wxiaoguang authored Jan 22, 2022
1 parent f910924 commit 5ff899d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/web/wrap_convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 5ff899d

Please sign in to comment.