Skip to content

Implement configurable ReadTimeout, WriteTimeout, and IdleTimeout #1311

Closed
@mholt

Description

@mholt

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:

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions