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
handle_empty_content! causes problems with Go's http.Client #1787
Comments
Rack 3 will support raising I suppose I'm not against adding an option that does this automatically, so long as it is off by default. @ioquatix what are your thoughts about that? |
@jeremyevans based on your assessment, Go is wrong and I don't think we should bother dealing with this. As you state, in Rack 3.0 we raise an exception which can be handled if applications need to work around this issue. |
@jeremyevans @ioquatix I registered this issue for the Go issue but it was closed. I share it with you. golang/go#52519 |
@catatsuy Thanks for sharing that. Apparently the Go developer who closed the issue doesn't understand the problem, since it is not related to redirects specifically. The Go developer is stating you should use 307 instead of 302 in your example code, to avoid triggering the buggy behavior in Go. That may work around the bug in Go, but it doesn't explain why Go is submitting invalid requests. |
Here is a followup PR against golang: golang/go#57273. |
refs: #1603
Go's http.client's automatic redirection uses the same Content-Type for GET. This request is invalid in rack 2.2.
I don't know if the Go implementation is wrong or the rack implementation is wrong. But because it is used in the actual implementation, could you please consider an option to disable it?
For example, you can see it in the following code.
The text was updated successfully, but these errors were encountered: