We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ae2e162 + 1d543c4 commit 2090ee1Copy full SHA for 2090ee1
1 file changed
pat.go
@@ -71,7 +71,9 @@ func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {
71
}
72
handler = r.NotFoundHandler
73
74
- defer context.Clear(req)
+ if !r.KeepContext {
75
+ defer context.Clear(req)
76
+ }
77
handler.ServeHTTP(w, req)
78
79
0 commit comments