From 2cb3d1d8936b2aa009edbde7696dde48961c77b3 Mon Sep 17 00:00:00 2001 From: Tom Bergan Date: Fri, 26 May 2017 10:05:38 -0700 Subject: [PATCH] net/http: update bundled x/net/http2 This updates the bundled copy of x/net/http2 to x/net git rev 3470a06c1357df53 for: http2: fix typo in comment https://golang.org/cl/44271 http2: fix nil dereference after Read completes with an error https://golang.org/cl/44330 Fixes #20501 Change-Id: Ie6a5fb092f77044f504f146721dae86299e04011 Reviewed-on: https://go-review.googlesource.com/44331 Run-TryBot: Tom Bergan Reviewed-by: Brad Fitzpatrick --- src/net/http/h2_bundle.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/net/http/h2_bundle.go b/src/net/http/h2_bundle.go index 6b8e9b4cdc..bec9b0c467 100644 --- a/src/net/http/h2_bundle.go +++ b/src/net/http/h2_bundle.go @@ -959,7 +959,7 @@ func http2configureTransport(t1 *Transport) (*http2Transport, error) { } // registerHTTPSProtocol calls Transport.RegisterProtocol but -// convering panics into errors. +// converting panics into errors. func http2registerHTTPSProtocol(t *Transport, rt RoundTripper) (err error) { defer func() { if e := recover(); e != nil { @@ -3555,7 +3555,7 @@ func (p *http2pipe) Read(d []byte) (n int, err error) { if p.breakErr != nil { return 0, p.breakErr } - if p.b.Len() > 0 { + if p.b != nil && p.b.Len() > 0 { return p.b.Read(d) } if p.err != nil { @@ -8811,7 +8811,7 @@ type http2PriorityWriteSchedulerConfig struct { } // NewPriorityWriteScheduler constructs a WriteScheduler that schedules -// frames by following HTTP/2 priorities as described in RFC 7340 Section 5.3. +// frames by following HTTP/2 priorities as described in RFC 7540 Section 5.3. // If cfg is nil, default options are used. func http2NewPriorityWriteScheduler(cfg *http2PriorityWriteSchedulerConfig) http2WriteScheduler { if cfg == nil { -- 2.50.0