Skip to content

middleware echo.Context Lost Path #2459

@wanglihui

Description

@wanglihui

middleware echo.Context Lost Path

v4.9.1 is correct
v4.10.2 is not correct;

Expected behaviour

c.Path() Get correct request Path

Actual behaviour

c.Path() Get ""

Steps to reproduce

see example code

Working code to debug

func Middleware(m *core.Mgr) echo.MiddlewareFunc {
	return func(next echo.HandlerFunc) echo.HandlerFunc {
		return func(c echo.Context) error {
                         // c.Path() is ""
			if c.Path() != m.GetPath() {
				return next(c)
			}
               //do some else
             }
       }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions