diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2022-01-22 23:05:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-22 15:05:22 +0000 |
commit | 5ff899d5ac4aa3558acb30dba8ba6fd93586cb62 (patch) | |
tree | deec8712c251938a405cfa1729bf7a8cd75e7f86 /modules/web | |
parent | f91092453ed0269420ab5161b4742a692dd500fe (diff) | |
download | gitea-5ff899d5ac4aa3558acb30dba8ba6fd93586cb62.tar.gz gitea-5ff899d5ac4aa3558acb30dba8ba6fd93586cb62.zip |
Fix route wrap (#18360)
Diffstat (limited to 'modules/web')
-rw-r--r-- | modules/web/wrap_convert.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/web/wrap_convert.go b/modules/web/wrap_convert.go index d4a24b3ad4..8dc4e6d62b 100644 --- a/modules/web/wrap_convert.go +++ b/modules/web/wrap_convert.go @@ -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: |