Having issues with the http package in the core of go. It appears that the file contents is cached although the Content-Length in the response body is correct. To demonstrat
Until VirtualBox has fixed the issue I made a go file that can be dropped into a project to disable sendfile support for the current process, go http package will then fallback to io.Copy
. Also works with boot2docker with some small docker config changes.
https://github.com/wader/disable_sendfile_vbox_linux
With newer versions of firejail you can do the same thing using:
firejail --seccomp.enotsup=sendfile ./program