Skip to content

Commit ee6618e

Browse files
Mark Smithvishr
Mark Smith
authored andcommitted
reset p.values to echo.maxParam (#1429)
* reset p.values to echo.maxParam * Update context.go How about just reset the values?
1 parent d286e28 commit ee6618e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

context.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -609,5 +609,7 @@ func (c *context) Reset(r *http.Request, w http.ResponseWriter) {
609609
c.path = ""
610610
c.pnames = nil
611611
// NOTE: Don't reset because it has to have length c.echo.maxParam at all times
612-
// c.pvalues = nil
612+
for i := 0; i < *c.echo.maxParam; i++ {
613+
c.pvalues[i] = ""
614+
}
613615
}

go.sum

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
2626
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
2727
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
2828
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
29+
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ=
2930
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
3031
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
3132
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

0 commit comments

Comments
 (0)