JuliaWeb / HTTP.jl

HTTP for Julia
https://juliaweb.github.io/HTTP.jl/stable/
Other
626 stars 177 forks source link

HTTP Keep-Alive header should be respected with connection pooling #1155

Open omus opened 4 months ago

omus commented 4 months ago

The HTTP Keep-Alive header includes a timeout parameter which is:

An integer that is the time in seconds that the host will allow an idle connection to remain open before it is closed. A connection is idle if no data is sent or received by a host. A host may keep an idle connection open for longer than timeout seconds, but the host should attempt to retain a connection for at least timeout seconds.

HTTP.jl's idle_timeout connection parameter should probably be updated to respect the timeout parameter specified by the server. This may help with solving problems such as https://github.com/JuliaWeb/HTTP.jl/issues/1141.