diff options
author | Jordan <me@jordan.im> | 2024-01-24 01:16:56 -0700 |
---|---|---|
committer | Jordan <me@jordan.im> | 2024-01-24 01:16:56 -0700 |
commit | fb07310bf45744f1eae582ce2546ed2dfcf50259 (patch) | |
tree | 149c1f385d1b186dd00b7014e763b8d14e876a22 | |
parent | 22a894c813bab20665ed5830e253d967aefb2e8b (diff) | |
download | pipkin-fb07310bf45744f1eae582ce2546ed2dfcf50259.tar.gz pipkin-fb07310bf45744f1eae582ce2546ed2dfcf50259.zip |
client: defer closure of S3 request response body
-rw-r--r-- | pipkin.go | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -177,6 +177,7 @@ func (pk *Pipkin) fetch(w http.ResponseWriter, r *http.Request) { http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound) return } + defer resp.Body.Close() statusOK := resp.StatusCode >= 200 && resp.StatusCode < 400 pk.log.Infof("%s %d %s %s %s\n", r.Method, resp.StatusCode, hostStr, host.Bucket, key) |