mirror of
https://github.com/golang/go
synced 2024-11-24 08:50:14 -07:00
net/http/httputil: don't log read error when it's context.Canceled
Fixes #18838 Change-Id: I44976cadb0dc3c23eacb8cdd58429a572cd8d28a Reviewed-on: https://go-review.googlesource.com/36358 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
2ca5d105b0
commit
fdbae7d77e
@ -286,7 +286,7 @@ func (p *ReverseProxy) copyBuffer(dst io.Writer, src io.Reader, buf []byte) (int
|
||||
var written int64
|
||||
for {
|
||||
nr, rerr := src.Read(buf)
|
||||
if rerr != nil && rerr != io.EOF {
|
||||
if rerr != nil && rerr != io.EOF && rerr != context.Canceled {
|
||||
p.logf("httputil: ReverseProxy read error during body copy: %v", rerr)
|
||||
}
|
||||
if nr > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user