diff options
author | Russ Cox <rsc@golang.org> | 2010-02-24 15:13:39 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2010-02-24 15:13:39 -0800 |
commit | c2e31d7301dc965ff6ebba7993eee62b8ab08113 (patch) | |
tree | 05b9e42c868c0140586e9f481853e9f09f96a12c /src/pkg/http/client.go | |
parent | 25df35f2c7eda611664834fa15d158482d800de4 (diff) | |
download | golang-c2e31d7301dc965ff6ebba7993eee62b8ab08113.tar.gz |
http: fix handling of Close, use Close in http.Post
default to HTTP/1.1
R=petar-m
CC=golang-dev
http://codereview.appspot.com/224041
Diffstat (limited to 'src/pkg/http/client.go')
-rw-r--r-- | src/pkg/http/client.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pkg/http/client.go b/src/pkg/http/client.go index 8c2c30124..96bd4458b 100644 --- a/src/pkg/http/client.go +++ b/src/pkg/http/client.go @@ -139,6 +139,7 @@ func Post(url string, bodyType string, body io.Reader) (r *Response, err os.Erro req.Method = "POST" req.ProtoMajor = 1 req.ProtoMinor = 1 + req.Close = true req.Body = nopCloser{body} req.Header = map[string]string{ "Content-Type": bodyType, |