Skip to content

Static route conflict with dynamic on same level - still... #1509

@pashaosipyants

Description

@pashaosipyants

Issue Description

If one register 3 routes, where 2 of them are static and start with the same character, and 3rd is dynamic, echo fails to find a handler.

Checklist

  • Dependencies installed
  • No typos
  • Searched existing issues and docs

Related issues #623 , #1406

Steps to reproduce

failing test
code

Working code to debug

	e := echo.New()
	g := e.Group("/g")
	g.GET("/skills", func(ctx echo.Context) error {
		return ctx.String(202, "static skills")
	})
	g.GET("/status", func(ctx echo.Context) error {
		return ctx.String(201, "static status")
	})
	g.GET("/:name", func(ctx echo.Context) error {
		return ctx.String(200, ctx.Param("name"))
	})
	e.Start(":8007")

curl localhost:8007/g/s ---> 404

Version/commit

Checked with versions v4.1.14, v4.1.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions