go /
net /
1b27761f1cd4840a914b5255e4357385091562e5 http2: swallow io.EOF while reading body and flow fix
This commit fixes two bugs.
The first bug returned io.EOF when a zero bytes were read from the
request body.
The second bug was a hang where the Transport waited for more flow
tokens than initialWindowSize BEFORE sending the first data frame which
never gave the server a chance to send flow tokens, so the client never
got enough to unblock awaitFlowControl. This commit changes
awaitFlowControl to wait for for [1,max] tokens, where max is the length
of the scratch buffer.
Change-Id: Ibbac0a38cd672535917a38330998d3b48d46f5f1
Reviewed-on: https://go-review.googlesource.com/16411
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2 files changed