gitaly-lfs-smudge: Fix missing close for HTTP body
The gitaly-lfs-smudge command is a smudge filter for Git which will
replace contents of LFS pointers with the actual LFS object's contents.
To do so, we need to request the object's contents from Rails via an
HTTP request. The tests exercising this code all of a sudden started
failing due to leaking Goroutines, where the leak happens in the HTTP
handling code. And sure enough: we never close the http.Response
body,
which may likely be the root cause here.
Fix this by always closing the body. While I have no idea why leaks started to happen just now, chances are high that this fixes the new flake.
Edited by Patrick Steinhardt