-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to configure ReadHeaderTimeout for HTTP server #423
Conversation
IdleTimeout: cfg.HTTPServerIdleTimeout, | ||
Handler: middleware.Merge(httpMiddleware...).Wrap(router), | ||
ReadTimeout: cfg.HTTPServerReadTimeout, | ||
ReadHeaderTimeout: cfg.HTTPServerReadHeaderTimeout, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a comment to explain why we want to set the read header timeout.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PTAL to see if new descriptions make sense.
Updated the description of fields and changelog entry. |
* By setting ReadHeaderTimeout, ReadTimeout is only used for body. * Add config option for read header timeout. * Add CHANGELOG.md entry. * Fix documentation and changelog entry.
What this PR does: Set read header timeout explicitly. This allows setting of shorter timeout for headers, and not using entire
-server.http-read-timeout
.Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]