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

rpc: set Request.GetBody for client requests #24292

Merged
merged 1 commit into from Jan 27, 2022

Commits on Jan 25, 2022

  1. Set Request.GetBody to ensure HTTP2 transport layer can rewind the Re…

    …quest.Body on retry
    
    When talking to an HTTP2 server, there are situations where it needs to to "rewind" the Request.Body.
    To allow this, we have to set up the Request.GetBody function to return a brand new instance of the body.
    
    If not set, we can end up with the following error:
    ```
    http2: Transport: cannot retry err [http2: Transport received Server's graceful shutdown GOAWAY] after Request.Body was written; define Request.GetBody to avoid this error
    ```
    
    Commit :
    https://sourcegraph.com/github.com/golang/net/-/commit/cffdcf672aee934982473246bc7e9a8ba446aa9b?visible=2
    ValentinTrinque committed Jan 25, 2022
    Copy the full SHA
    0f330dc View commit details
    Browse the repository at this point in the history