aboutsummaryrefslogtreecommitdiff
path: root/weed/util/http_util.go
diff options
context:
space:
mode:
authorKonstantin Lebedev <lebedev_k@tochka.com>2020-12-01 16:03:34 +0500
committerKonstantin Lebedev <lebedev_k@tochka.com>2020-12-01 16:03:34 +0500
commit03620776ece3175dac979b05c491d26d14faef0f (patch)
tree4fce7d0a55c3fa7f5b7c43e9d90d5e194c439239 /weed/util/http_util.go
parent4e55baf5b109cfe5cf9f65c44cd92c542b4acf5e (diff)
parent005a6123e98170b2bdf99eb5b8a67ca3cea94190 (diff)
downloadseaweedfs-03620776ece3175dac979b05c491d26d14faef0f.tar.xz
seaweedfs-03620776ece3175dac979b05c491d26d14faef0f.zip
Merge branch 'upstream_master' into store_s3cred
Diffstat (limited to 'weed/util/http_util.go')
-rw-r--r--weed/util/http_util.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/weed/util/http_util.go b/weed/util/http_util.go
index 7851d8293..2cd69b01b 100644
--- a/weed/util/http_util.go
+++ b/weed/util/http_util.go
@@ -374,3 +374,8 @@ func CloseResponse(resp *http.Response) {
io.Copy(ioutil.Discard, resp.Body)
resp.Body.Close()
}
+
+func CloseRequest(req *http.Request) {
+ io.Copy(ioutil.Discard, req.Body)
+ req.Body.Close()
+}