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

client: retry logic doesn't work with POST requests #151

Open
kayrus opened this issue Mar 27, 2021 · 0 comments
Open

client: retry logic doesn't work with POST requests #151

kayrus opened this issue Mar 27, 2021 · 0 comments

Comments

@kayrus
Copy link
Contributor

kayrus commented Mar 27, 2021

RoundTripper POST request retries will fail with http: ContentLength=449 with Body length 0 error for each retry, when the first error returned by original RoundTripper is net/http: timeout awaiting response headers (or others, which are caused once the TCP transport level is established and the request body is sent). The original RoundTripper reads the body and body reader internal pos is set to the end, therefore we need to unread/rewind/set the read position to the beginning, or define a custom request's ReadBody method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant