Closed
Description
Some recent events have reminded me that we should finally implement this TODO in Caddy: a way to set WriteTimeout, ReadTimeout, and (coming in Go 1.8) IdleTimeout.
Required reading:
- https://blog.gopheracademy.com/advent-2016/exposing-go-on-the-internet/
- https://blog.cloudflare.com/the-complete-guide-to-golang-net-http-timeouts/
I figure this will be either one or three new directives for the Caddyfile.
Since these timeouts can't be set on a per-request basis, we have to reduce any repeated invocations of these directives across sites on a listener to a single value -- probably the lowest value among them. This is not too bad. We can print a warning if that's the case.
While we're at it, we should also make the max header size configurable too.