-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
http2: use GetBody unconditionally on Transport retry, when available
We were previously only using the new-ish Request.GetBody to "rewind" a Request.Body on retry when it seemed that we hadn't started the read+write body copy process from the old request yet. Apparently there's a bug somewhere, so this is a safe minimal fix for now, unconditionally using GetBody when it's available, rather than only using it when it seems we need to. Should have no performance impact because it's supposed to be cheap, and this only happens on rare retries where the server's GOAWAY came in-flight while we were writing a request. Updates golang/go#25009 (not a fix, but enough for Go 1.11) Change-Id: Ia462944d4a68cf2fde8d32b7b357b450c509a349 Reviewed-on: https://go-review.googlesource.com/123476 Reviewed-by: Ian Lance Taylor <iant@golang.org>
- Loading branch information
Showing
2 changed files
with
65 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters