Commit 297d1d73 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

net/http: use keyed composite literal

Makes vet happy.

Updates #11041

Change-Id: I23ca413c03ff387359440af8114786cd7880a048
Reviewed-on: https://go-review.googlesource.com/27124
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 302dd7b7
...@@ -214,7 +214,7 @@ func (t *transferWriter) WriteBody(w io.Writer) error { ...@@ -214,7 +214,7 @@ func (t *transferWriter) WriteBody(w io.Writer) error {
if t.Body != nil { if t.Body != nil {
if chunked(t.TransferEncoding) { if chunked(t.TransferEncoding) {
if bw, ok := w.(*bufio.Writer); ok && !t.IsResponse { if bw, ok := w.(*bufio.Writer); ok && !t.IsResponse {
w = &internal.FlushAfterChunkWriter{bw} w = &internal.FlushAfterChunkWriter{Writer: bw}
} }
cw := internal.NewChunkedWriter(w) cw := internal.NewChunkedWriter(w)
_, err = io.Copy(cw, t.Body) _, err = io.Copy(cw, t.Body)
......
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