Commit 64648986 authored by Gustavo Niemeyer's avatar Gustavo Niemeyer

net/http: don't drop error on request write

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7230059
parent f12796e9
......@@ -194,10 +194,11 @@ func (t *transferWriter) WriteBody(w io.Writer) (err error) {
ncopy, err = io.Copy(w, t.Body)
} else {
ncopy, err = io.Copy(w, io.LimitReader(t.Body, t.ContentLength))
nextra, err := io.Copy(ioutil.Discard, t.Body)
if err != nil {
return err
}
var nextra int64
nextra, err = io.Copy(ioutil.Discard, t.Body)
ncopy += nextra
}
if err != nil {
......
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