echo
echo copied to clipboard
Routing is stripping fragements
Issue Description
I try to get access to URL fragment (after #), but it's returning an empty value. I wonder if in the middle of the routing echo is not losing information.
Expected behaviour
A fragment is not empty in the request URL
Actual behaviour
A fragment is empty in the request URL
Steps to reproduce
Register GET endpoint
func RegisterEndpoints(e *echo.Echo) {
e.GET("/test", func(c echo.Context) error {
if c.Request().URL.Fragment == "" {
returnc.NoContent(http.StatusUnauthorized)
}
return c.NoContent(http.StatusAccepted)
})
}
Hit endpoint with hash like /test#data=1234
Version/commit
v4.3.0
Fragments are never part of a request. They are only processed at the client and not visible for the server.
So this behavior is expected and not a bug