Commit 403019bf authored by Thanabodee Charoenpiriyakij's avatar Thanabodee Charoenpiriyakij Committed by Brad Fitzpatrick

http2: set nextStreamID to 3 when AllowHTTP is set

Fixes golang/go#25230

Change-Id: Ie16295552fcd414555153626f62170ffb7bdba1d
Reviewed-on: https://go-review.googlesource.com/111835Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 640f4622
......@@ -567,6 +567,10 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
// henc in response to SETTINGS frames?
cc.henc = hpack.NewEncoder(&cc.hbuf)
if t.AllowHTTP {
cc.nextStreamID = 3
}
if cs, ok := c.(connectionStater); ok {
state := cs.ConnectionState()
cc.tlsState = &state
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment