File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ func (c *Context) Copy() *Context {
120120 cp .Writer = & cp .writermem
121121 cp .index = abortIndex
122122 cp .handlers = nil
123+ cp .fullPath = c .fullPath
123124
124125 cKeys := c .Keys
125126 cp .Keys = make (map [string ]any , len (cKeys ))
Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ func TestContextCopy(t *testing.T) {
324324 c .handlers = HandlersChain {func (c * Context ) {}}
325325 c .Params = Params {Param {Key : "foo" , Value : "bar" }}
326326 c .Set ("foo" , "bar" )
327+ c .fullPath = "/hola"
327328
328329 cp := c .Copy ()
329330 assert .Nil (t , cp .handlers )
@@ -336,6 +337,7 @@ func TestContextCopy(t *testing.T) {
336337 assert .Equal (t , cp .Params , c .Params )
337338 cp .Set ("foo" , "notBar" )
338339 assert .False (t , cp .Keys ["foo" ] == c .Keys ["foo" ])
340+ assert .Equal (t , cp .fullPath , c .fullPath )
339341}
340342
341343func TestContextHandlerName (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments