Skip to content

Escaped forward slashes in path parameter #587

Closed

Description

@cdfox

Is there a way to use an escaped forward slash ("%2F") in a path parameter? I modified the hello world example from the README slightly to take a path parameter and am getting a 404 when I send an escaped URL. For example: http://localhost:8080/https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FWindsor_Castle%23%2Fmedia%2FFile%3AWindsor_Castle_at_Sunset_-_Nov_2006.jpg

This is the modified hello world example:

package main

import (
    "net/http"
    "github.com/labstack/echo"
    "github.com/labstack/echo/engine/standard"
)

func main() {
    e := echo.New()
    e.GET("/:name", func(c echo.Context) error {
        return c.String(http.StatusOK, "Hello, " + c.Param("name") + "!")
    })
    e.Run(standard.New(":8080"))
}

Activity

  1. self-assigned this
    on Jun 29, 2016
  2. vishr commented on Jun 29, 2016

    @vishr
    Member

    @cdfox Please verify

  3. cdfox commented on Jun 29, 2016

    @cdfox
    Author

    Thanks for the quick response! Yes, it works.

  4. added a commit that references this issue on Apr 23, 2025
    c00d017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions