mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 21:32:11 +08:00
Merge 3f726c6ad8a1b1bcef49ab6c3e75f48cd1d10ebb into d8dfaaeb2e3b6c1c6a5ac5ffe41d2e20be8f7958
This commit is contained in:
commit
71109efdfb
@ -50,6 +50,7 @@ type Context struct {
|
|||||||
Writer ResponseWriter
|
Writer ResponseWriter
|
||||||
|
|
||||||
Params Params
|
Params Params
|
||||||
|
// when the operation is not initialized, the default is nil slice
|
||||||
handlers HandlersChain
|
handlers HandlersChain
|
||||||
index int8
|
index int8
|
||||||
fullPath string
|
fullPath string
|
||||||
@ -110,12 +111,13 @@ func (c *Context) Copy() *Context {
|
|||||||
Request: c.Request,
|
Request: c.Request,
|
||||||
Params: c.Params,
|
Params: c.Params,
|
||||||
engine: c.engine,
|
engine: c.engine,
|
||||||
|
Keys: make(map[string]interface{}, len(c.Keys)),
|
||||||
|
index: abortIndex,
|
||||||
|
handlers: nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
cp.writermem.ResponseWriter = nil
|
cp.writermem.ResponseWriter = nil
|
||||||
cp.Writer = &cp.writermem
|
cp.Writer = &cp.writermem
|
||||||
cp.index = abortIndex
|
|
||||||
cp.handlers = nil
|
|
||||||
cp.Keys = map[string]interface{}{}
|
|
||||||
for k, v := range c.Keys {
|
for k, v := range c.Keys {
|
||||||
cp.Keys[k] = v
|
cp.Keys[k] = v
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user