Merge 5a9754369d76dc955f97a93c9d79c416063c26e7 into 2e2bd1f408fdaa5e522bc56972e3f109fd7502fd

This commit is contained in:
Name 2025-05-20 16:51:59 +03:00 committed by GitHub
commit efee2b2938
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,21 +120,21 @@ func (c *Context) Copy() *Context {
writermem: c.writermem, writermem: c.writermem,
Request: c.Request, Request: c.Request,
engine: c.engine, engine: c.engine,
fullPath: c.fullPath,
} }
cp.writermem.ResponseWriter = nil cp.writermem.ResponseWriter = nil
cp.Writer = &cp.writermem cp.Writer = &cp.writermem
cp.index = abortIndex cp.index = abortIndex
cp.handlers = nil cp.handlers = nil
cp.fullPath = c.fullPath
cKeys := c.Keys
cp.Keys = make(map[string]any, len(cKeys))
c.mu.RLock() c.mu.RLock()
cKeys := c.Keys
c.mu.RUnlock()
cp.Keys = make(map[string]any, len(cKeys))
for k, v := range cKeys { for k, v := range cKeys {
cp.Keys[k] = v cp.Keys[k] = v
} }
c.mu.RUnlock()
cParams := c.Params cParams := c.Params
cp.Params = make([]Param, len(cParams)) cp.Params = make([]Param, len(cParams))