-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Fix akka-http server configuration for request timeout #8137
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
Fix akka-http server configuration for request timeout #8137
Conversation
gmethvin
left a comment
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.
lgtm
| # How long a request takes until it times out | ||
| requestTimeout = null | ||
| # How long a request takes until it times out. Set to null or "infinite" to disable the timeout. | ||
| requestTimeout = "infinite" |
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.
I think it looks better without the quotes, since in this case "infinite" is meant to be a special value and not a literal string.
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.
Fixed.
richdougherty
left a comment
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.
LGTM 👍
I scanned the logic for Configuration.durationLoader and double-checked that null means Duration.Inf, so past behaviour should still be preserved.
|
Thank you, @richdougherty. Your double-check made me check if we also have tests for playframework/framework/src/play/src/test/scala/play/api/ConfigurationSpec.scala Lines 37 to 55 in 9cd76d4
I'm merging and backporting this now. |
* Fix akka-http server configuration for request timeout * Use "infinite" as the default value for timeouts
|
Backport to 2.6.x: 4fd249d |
Fixes
Fixes #8096.
Purpose
The request timeout should be
Duration.Infwhenplay.server.akka.requestTimeoutis null.