summaryrefslogtreecommitdiff
path: root/src/pkg/http/client.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-02-24 15:13:39 -0800
committerRuss Cox <rsc@golang.org>2010-02-24 15:13:39 -0800
commitc2e31d7301dc965ff6ebba7993eee62b8ab08113 (patch)
tree05b9e42c868c0140586e9f481853e9f09f96a12c /src/pkg/http/client.go
parent25df35f2c7eda611664834fa15d158482d800de4 (diff)
downloadgolang-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.go1
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,