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: Client doesn't support 302/303 redirects from POST->GET #4145

Closed
gopherbot opened this issue Sep 24, 2012 · 10 comments
Closed

net/http: Client doesn't support 302/303 redirects from POST->GET #4145

gopherbot opened this issue Sep 24, 2012 · 10 comments
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Milestone

Comments

@gopherbot
Copy link

by tomjamesgillespie:

What steps will reproduce the problem?
1. Make a post request with http.Client
2. If a 30x is returned, the redirect isn't followed

What is the expected output?
http.Client should follow the redirect chain, and return the final response

Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
Windows 386

Which version are you using?  (run 'go version')
devel (straight from hg)
@gopherbot
Copy link
Author

Comment 1 by tomjamesgillespie:

Redirecting after a POST is a common idiom, see
http://en.wikipedia.org/wiki/Post/Redirect/Get

@bradfitz
Copy link
Contributor

Comment 2:

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

Owner changed to @bradfitz.

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Oct 6, 2012

Comment 3:

Labels changed: added go1.1.

@gopherbot
Copy link
Author

Comment 4 by hannson:

What about loops? www.google.com -> google.com -> www.google.com -> google.com -> etc..
etc..

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 5:

Labels changed: added size-m.

@rsc
Copy link
Contributor

rsc commented Dec 10, 2012

Comment 6:

Labels changed: added suggested.

@gopherbot
Copy link
Author

Comment 7 by relishpl:

Yes. post-redirect-get is a very common webapp server pattern. A best-practices one,
arguably.
Annoying to have to build your own redirecting Post implementation out of lower level
methods.

@bradfitz
Copy link
Contributor

Comment 8:

This bug was already Accepted.

@bradfitz
Copy link
Contributor

Comment 9:

Sent https://golang.org/cl/6923055

Status changed to Started.

@bradfitz
Copy link
Contributor

Comment 10:

This issue was closed by revision 08ce7f1.

Status changed to Fixed.

@gopherbot gopherbot added fixed Suggested Issues that may be good for new contributors looking for work to do. labels Dec 12, 2012
@rsc rsc added this to the Go1.1 milestone Apr 14, 2015
@rsc rsc removed the go1.1 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.
Labels
FrozenDueToAge Suggested Issues that may be good for new contributors looking for work to do.
Projects
None yet
Development

No branches or pull requests

3 participants