diff options
| author | Konstantin Lebedev <lebedev_k@tochka.com> | 2020-12-01 16:03:34 +0500 |
|---|---|---|
| committer | Konstantin Lebedev <lebedev_k@tochka.com> | 2020-12-01 16:03:34 +0500 |
| commit | 03620776ece3175dac979b05c491d26d14faef0f (patch) | |
| tree | 4fce7d0a55c3fa7f5b7c43e9d90d5e194c439239 /weed/util/http_util.go | |
| parent | 4e55baf5b109cfe5cf9f65c44cd92c542b4acf5e (diff) | |
| parent | 005a6123e98170b2bdf99eb5b8a67ca3cea94190 (diff) | |
| download | seaweedfs-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.go | 5 |
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() +} |
