mirror of
https://github.com/golang/go
synced 2024-11-18 01:14:48 -07:00
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 <tombergan@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
0a3f3e166d
commit
2cb3d1d893
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user