Skip to content

OTP-20271 - #11543

Merged
Whaileee merged 6 commits into
erlang:masterfrom
Whaileee:whaileee/OTP-20271
Sep 1, 2026
Merged

OTP-20271#11543
Whaileee merged 6 commits into
erlang:masterfrom
Whaileee:whaileee/OTP-20271

Conversation

@Whaileee

Copy link
Copy Markdown
Contributor

No description provided.

Whaileee and others added 5 commits August 19, 2026 16:13
    keep_alive_timeout would check the time between opening a connection,
    or right after sending a response, until the next request's headers
    are parsed.
    Now the timeout is cancelled as soon as new data arrives, before the
    parsing.
    Allow atom `infinity` as a value for keep_alive_timeout to disable the
    timeout entirely.
This option sets a max timeout for how long a body read will wait
for there to be more data delivered before it is terminated.

A similar limit can be set by using max_bytes_per_second, but that
is much harder to tune and predict, so we add a new option that
reflects how nginx handles such timeouts.
  - Rename the max_body_read_timeout option to request_timeout
    (default unchanged, 60 seconds), matching its documented purpose
    of bounding idle time between message chunk reads.
  - Rename HTTP_MAX_BODY_READ_TIMEOUT macro to HTTP_REQUEST_READ_TIMEOUT.
  - Rename #state fields timeout/body_timeout to keepalive_timeout/
    request_timeout in httpd_request_handler, and the corresponding
    activate_body_timeout/reset_body_timeout functions to
    activate_request_timeout/reset_request_timeout.
  - Guard activate_keepalive_timeout/1 with timer = undefined so it
    only arms a fresh timer, instead of unconditionally overwriting
    a running one.
  - Update httpd.erl -doc and -spec LimitOption references, and widen
    keep_alive_timeout/request_timeout types to include infinity().
  - Update httpd_basic_SUITE to use the renamed request_timeout option.
@Whaileee Whaileee self-assigned this Aug 27, 2026
@Whaileee Whaileee added the team:PS Assigned to OTP team PS label Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

CT Test Results

  1 files   11 suites   3m 46s ⏱️
 96 tests  92 ✅ 4 💤 0 ❌
112 runs  108 ✅ 4 💤 0 ❌

Results for commit 4735e80.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@Whaileee
Whaileee merged commit 90e9acb into erlang:master Sep 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:PS Assigned to OTP team PS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants