(Are you asking for help with using Caddy? Please use our forum instead: https://forum.caddyserver.com. If you are filing a bug report, please answer the following questions. If your issue is not a bug report, you do not need to use this template. Either way, please consider donating if we've helped you. Thanks!)
caddy -version)?Caddy 0.9.5
wget a file from caddy:

10.20.0.14:8080
log
Windows 7. Caddy executed via caddy.exe with no parameters
Expected the file to download successfully.
The file is downloaded partially. Caddy closes the connection (normally) before the entire file is sent (see wget output).
HTTP Request and response, captured using Wireshark (note the correct Content-Length):
GET REMOVED HTTP/1.1
Host: 10.20.0.14:8080
User-Agent: Wget
Connection: close
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 9609193
Content-Type: application/zip
Etag: W/"58d245a8-929fe9"
Last-Modified: Wed, 22 Mar 2017 09:36:40 GMT
Server: Caddy
Date: Wed, 22 Mar 2017 09:58:53 GMT
Connection: close
Caddy closes the connection normally after about 8MB of data:

The access log shows a 200 response, with the incorrect response size:
10.20.0.6 - [22/Mar/2017:11:59:13 +0200] "GET REMOVED HTTP/1.1" 200 8617984
Not sure. It happens on my machine all the time with files larger than a few megabytes. But I'm guessing that if caddy had a constant issue with serving files over a given size, someone would have caught it by now.
@MaltAlex This may be to do with default timeouts - in 0.9.5 caddy has default timeouts set which create issues similar to this. We have decided to remove default timeouts in 0.9.6.
for the moment a workaround is to supply a caddyfile with timeouts specified as off
mydomain.com {
timeouts none
}
If this doesn't fix your issue please feel free to let us know.
@tobya Thanks. I'll try it out.
But even with these timeouts, why should caddy timeout during an active file transfer? This doesn't sound like a problem with the default values; it sounds like a problem with the way in which timeouts are implemented.
Also, such errors should probably be logged somewhere...
@tobya yeah, that solved the problem
Thanks to all of you guys, this solved my problem too. BTW my caddy version is the very 0.9.5 :)
You should update to the latest version of Caddy
Most helpful comment
@tobya Thanks. I'll try it out.
But even with these timeouts, why should caddy timeout during an active file transfer? This doesn't sound like a problem with the default values; it sounds like a problem with the way in which timeouts are implemented.
Also, such errors should probably be logged somewhere...