Closed waynexia closed 1 week ago
The recent updates introduce greater flexibility and customization to the HttpServer
. Notably, the timeout
and body_limit
settings can now be disabled by setting them to 0 in the configuration files. Additionally, the build
method in HttpServer
dynamically configures these settings based on server options, logging any disabled states for better clarity and management.
File | Change Summary |
---|---|
config/frontend.example.toml |
Updated timeout and body_limit settings to allow disabling by setting to 0. |
config/standalone.example.toml |
Revised comments to reflect the ability to disable timeout and body_limit by setting them to 0. |
src/servers/src/http.rs |
Modified build method in HttpServer to dynamically configure timeout_layer and body_limit_layer based on server options, and log disabled states. |
sequenceDiagram
participant Config as Config
participant HttpSrv as HttpServer
participant Router as Router
Config->>HttpSrv: Provide settings (timeout, body_limit)
HttpSrv->>HttpSrv: Check if timeout or body_limit is 0
Note right of HttpSrv: If 0, disable the respective layer
HttpSrv->>Router: Configure Router with dynamic settings
Router-->>HttpSrv: Router is configured
HttpSrv->>Log: Log disabled states if any
In the code where servers bloom,
Timeout and limits find their room.
Set a zero, watch them fade,
Flexibility is now displayed.
Dynamic layers, a dance so neat,
Logging states, our work's complete. 🚀
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
Set timeout or body limit to 0 to disable them.
Checklist
Summary by CodeRabbit
timeout
andbody_limit
settings by setting them to 0 in configuration files, allowing more flexible customization.timeout
andbody_limit
settings, including logging when these settings are disabled.