Closed
Description
Issue Description
Request hangs (no response), the server process has 100% CPU usage when route has a path parameter (e.g.: "/users/:id") and URL is terminated with "/"
Checklist
- Dependencies installed
- No typos
- Searched existing issues and docs
Expected behaviour
404 error
Actual behaviour
Request hangs, causing the server process to use 100% CPU
Steps to reproduce
curl localhost:8080/users/123/
Working code to debug
package main
import (
"github.com/labstack/echo/v4"
"net/http"
)
func main() {
e := echo.New()
e.GET("/users/:id", func(c echo.Context) error {
id := c.Param("id")
return c.String(http.StatusOK, "id=" + id)
})
e.Logger.Fatal(e.Start(": 8080"))
}
Version/commit
v4.1.14