Skip to content

Same path routing bug #479

Description

@ww24

Is this behavior a bug?

package main

import (
    "net/http"

    "github.com/labstack/echo"
    "github.com/labstack/echo/engine/standard"
)

func main() {
    e := echo.New()

    e.GET("/:piyo", func(c echo.Context) error {
        return c.String(http.StatusOK, "fail: "+c.Param("piyo"))
    })
    e.POST("/:hoge", func(c echo.Context) error {
        return c.String(http.StatusOK, "success: "+c.Param("hoge"))
    })

    e.Run(standard.New(":1323"))
}

c.Param("piyo") is empty. 😢

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions