fix(http): advertise Deno.serve keep-alive timeout#34172
Open
lunadogbot wants to merge 2 commits into
Open
Conversation
fibibot
approved these changes
May 17, 2026
Contributor
fibibot
left a comment
There was a problem hiding this comment.
LGTM. The option is validated before reaching the op boundary, the Rust plumbing keeps it scoped to HTTP/1 serving, and the test covers both the advertised header and idle connection closure. CI is green.\n\n@bartlomieju this looks ready to merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #32497.
Closes bartlomieju/orchid-inbox#135
This adds a
keepAliveTimeoutoption for TCPDeno.serveHTTP/1.1 servers. When set to a non-zero value, Deno configures Hyper with a timer-backed HTTP/1 header read timeout so idle keep-alive connections close on the configured schedule, and responses advertise the lifetime withKeep-Alive: timeout=N.Verification:
cargo fmt --checkdeno fmt --check tests/unit/serve_test.ts cli/tsc/dts/lib.deno.ns.d.tscargo check -p deno_httpcargo test -p deno_http test_handle_requestcargo build -p deno./target/debug/deno test --no-check -A --config tests/config/deno.json tests/unit/serve_test.ts --filter httpServerKeepAliveTimeoutAdvertisedAndEnforcedcargo test -p deno --test integration serve:: -- --nocaptureNote: direct unit test execution required initializing
tests/util/stdso the repo import map could resolve local std test utilities.