summaryrefslogtreecommitdiffstats
path: root/modules/web
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-01-22 23:05:22 +0800
committerGitHub <noreply@github.com>2022-01-22 15:05:22 +0000
commit5ff899d5ac4aa3558acb30dba8ba6fd93586cb62 (patch)
treedeec8712c251938a405cfa1729bf7a8cd75e7f86 /modules/web
parentf91092453ed0269420ab5161b4742a692dd500fe (diff)
downloadgitea-5ff899d5ac4aa3558acb30dba8ba6fd93586cb62.tar.gz
gitea-5ff899d5ac4aa3558acb30dba8ba6fd93586cb62.zip
Fix route wrap (#18360)
Diffstat (limited to 'modules/web')
-rw-r--r--modules/web/wrap_convert.go3
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: