]> Cypherpunks repositories - gostls13.git/commitdiff
net/http: update bundled x/net/http2
authorTom Bergan <tombergan@google.com>
Fri, 26 May 2017 17:05:38 +0000 (10:05 -0700)
committerBrad Fitzpatrick <bradfitz@golang.org>
Fri, 26 May 2017 19:24:55 +0000 (19:24 +0000)
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 <tombergan@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/net/http/h2_bundle.go

index 6b8e9b4cdc2844e6944f89cb0346dae6b0ded29b..bec9b0c467b09f4de690485a2655851bfcdf3ee4 100644 (file)
@@ -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 {