Skip to content

net/http: ServeMux uses un-escaped paths in the implicit /tree → /tree/ redirect #10572

Closed
@ghost

Description

• go version
go version go1.4.1 linux/amd64

• What did you do?
http://play.golang.org/p/bD-nCEHtR_
Registered a http.Handler for the pattern "/#/" and made a GET request to http://localhost/%23.

• What did you expect to see?
An HTTP redirect to "/%23/"

• What did you see instead?

HTTP/1.1 301 Moved Permanently
Location: /#/

The server appends a slash to the un-escaped path and redirects the client. Following this redirect gives a 404.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions