Skip to content

Add configurable request read timeout - #768

Open
mikelolasagasti wants to merge 2 commits into
adnanh:masterfrom
mikelolasagasti:fix-read-timeout
Open

Add configurable request read timeout#768
mikelolasagasti wants to merge 2 commits into
adnanh:masterfrom
mikelolasagasti:fix-read-timeout

Conversation

@mikelolasagasti

Copy link
Copy Markdown

Dependent follow-up to #759.

This branch includes #759 as its first commit because the read-timeout change builds on that request-body-size work.

Please review only the second commit: Add configurable request read timeout.

It adds -read-timeout to configure http.Server.ReadTimeout, limiting how long clients may take to send the full request, including the body.

After #759 lands, I can rebase this branch onto master so the PR contains only the timeout change.

Add a -max-body-size flag to optionally limit request body reads and
return 413 for oversized requests.

Keep the default at 0 to preserve existing unlimited behavior, but warn
on startup when request body size is unlimited and document the
production recommendation to configure a positive limit.

Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
Add a -read-timeout flag to optionally limit how long the server
spends reading an incoming request, including the request body.

Keep the default at 0 to preserve existing unlimited behavior, and
document the production recommendation to configure a timeout alongside
-max-body-size.

Signed-off-by: Mikel Olasagasti Uranga <mikel@olasagasti.info>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant