http.FileServer caching files and serving old versions after edit

后端 未结 4 1871
甜味超标
甜味超标 2020-12-31 11:51

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

4条回答
  •  一整个雨季
    2020-12-31 11:53

    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
    

提交回复
热议问题