Created attachment 8691 [details] Sample script that replicates the issue When wget is invoked with a stdout redirection to a file and receives an empty response from the server the destination file is truncated to 0 bytes. This is caused by ftruncate being called with length 0.
Fixed in git.