-
Notifications
You must be signed in to change notification settings - Fork 252
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
Request wrapper make standard request GetBody
property always nil
#121
Comments
Good find! This is probably a relic of this library existing since before |
We ran into this today as well with HTTP2:
Not sure why the HTTP2 is trying to retry requests on its own when the body was sent but it failed since the body could not be consumed again. |
I would need to be able to log all requests (and their payloads) inside |
Is there any update on a fix for this bug? We are running into this with an API that redirects with a 308 while PUTing a request body. Any know workarounds we can use in our client to bypass this issue for now? |
@rgb-24bit - I rebased and tested your changes here: #122 on my own fork, and they seem to work well for fixing my 308 redirect issue. Can you rebase your PR and try to get this fix merged in? |
Fixes: hashicorp#121 Related to error on HTTP Status code 308 that does not redirect properly.
@tagur87 done rebase |
Is there any movement on getting this change merged into master? |
Set GetBody property when body is not empty (hashicorp#121)
In the Go standard library, when creating a new request, the GetBody property of the request is set according to the body parameter.
This attribute will affect the client's behavior after receiving the 307, 308 response code. If it is empty, it is likely that it will not follow redirect.
But now when request wrapper creates a new request, the body parameter is not passed, making GetBody always nil.
The text was updated successfully, but these errors were encountered: