To reproduce
-
Create or link a large (10s of MB) binary file to /tmp/big.zip.
-
Run
-
Fetch the data with curl:
curl -O http://localhost:8080
==> fails in chunky parser at random points during download
-
Fetch the data with wget:
==> works
(Chrome fails mid-stream similarly to curl. It may use libcurl.)
What about setting Content-Length? Also, instead of executing cat, you could open a readstream for the file and use sys.pump to write it to the response stream.