Serve plain HTTP through the shared hyper accept loop with connection cap and header timeout

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YShymaPrXmc3KYRUg2HMSs
This commit is contained in:
ariandClaude Sonnet 5.5 committed 2026-10-16 10:02:08 -04:00
1 parent d5a0373a75
commit f1d659965b
6 files changed
+245 -136

No files matched your search

+5 -7
View File
@@ -168,17 +168,15 @@ async fn serve(config: Config) -> Result<()> {
// `serve_listener` returns once the shutdown token fires and connections
// drain. If the token has not fired it is a server error, so return
// immediately. Bound the drain so a stuck client cannot hang SIGTERM.
let serving: std::pin::Pin<Box<dyn std::future::Future<Output = Result<()>> + Send>> = match tls
{
Some((acceptor, _)) => Box::pin(tls::serve_tls(
let acceptor = tls.map(|(acceptor, _)| acceptor);
let serving: std::pin::Pin<Box<dyn std::future::Future<Output = Result<()>> + Send>> =
Box::pin(server::serve_listener(
listener,
acceptor,
app,
shutdown.clone(),
tls::Limits::default(),
)),
None => Box::pin(server::serve_listener(listener, app, shutdown.clone())),
};
server::Limits::default(),
));
tokio::pin!(serving);
let result = tokio::select! {
r = &mut serving => r,