1
0
mirror of https://github.com/labstack/echo.git synced 2025-11-25 22:32:23 +02:00

reset p.values to echo.maxParam (#1429)

* reset p.values to echo.maxParam
* Update context.go

How about just reset the values?
This commit is contained in:
Mark Smith
2019-10-24 18:48:56 +01:00
committed by Vishal Rana
parent d286e285dc
commit ee6618e831
2 changed files with 4 additions and 1 deletions

View File

@@ -609,5 +609,7 @@ func (c *context) Reset(r *http.Request, w http.ResponseWriter) {
c.path = ""
c.pnames = nil
// NOTE: Don't reset because it has to have length c.echo.maxParam at all times
// c.pvalues = nil
for i := 0; i < *c.echo.maxParam; i++ {
c.pvalues[i] = ""
}
}