Skip to content

net/http: redirect helper does not preserve querystring #5252

Closed
@gopherbot

Description

@gopherbot

by daniel.r.heath:

I'm using net/http ServeMux.

When I register '/foo/' as a route, then any attempt to GET '/foo' will redirect to
'/foo/'.

This is added in http://golang.org/src/pkg/net/http/server.go?s=25649:25677#962 .

However, any attempt to GET '/foo?query=string' will also redirect to '/foo'.

When we add redirection helpers, they shouldn't silently discard part of the request.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions