Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
gopherbot opened this issue Apr 10, 2013 · 8 comments
Closed

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

gopherbot opened this issue Apr 10, 2013 · 8 comments
Milestone

Comments

@gopherbot
Copy link

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.
@minux
Copy link
Member

minux commented Apr 10, 2013

Comment 1:

i created https://golang.org/cl/7099045/, but failed to mail it out.
@brad, is this issue worth Go1.1?

Labels changed: added priority-later, removed priority-triage.

Status changed to Accepted.

@bradfitz
Copy link
Contributor

Comment 2:

What was the behavior in Go 1.0.3?

@gopherbot
Copy link
Author

Comment 3 by daniel.r.heath:

This is current in both 1.0.3 and master (as of a week ago)

@bradfitz
Copy link
Contributor

Comment 4:

If it's not a regression from Go 1.0.3, it's too late to fix it for Go 1.1.

@minux
Copy link
Member

minux commented May 1, 2013

Comment 5:

Issue #5382 has been merged into this issue.

@rsc
Copy link
Contributor

rsc commented Jul 30, 2013

Comment 6:

Please fix for Go1.2 though.

Labels changed: added go1.2.

@bradfitz
Copy link
Contributor

bradfitz commented Sep 6, 2013

Comment 7:

Fixed in submitted https://golang.org/cl/7099045/ which didn't include a "Fixes
issue #5252" line.

@bradfitz
Copy link
Contributor

bradfitz commented Sep 6, 2013

Comment 8:

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants