Skip to content

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

@kayrus

Description

@kayrus

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions