hyperium / hyper

An HTTP library for Rust
https://hyper.rs
MIT License
14.42k stars 1.59k forks source link

Client should respect the "Keep-Alive" header #2720

Open loyd opened 2 years ago

loyd commented 2 years ago

It seems that hyper doesn't respect the Keep-Alive header and just uses a predefined value (90 seconds). Instead, hyper should consider the header and rotate connections according to it.

Related issue: https://github.com/hyperium/hyper/issues/2136. Users disable the pool totally as the easiest solution.

seanmonstar commented 2 years ago

Do other client libraries pay attention to that header? I haven't noticed any...

sfackler commented 2 years ago

It looks like browsers universally support it at least: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Keep-Alive