git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/3] http: support fine-tuning curl's keepalive behavior

From
Taylor Blau <me@ttaylorr.com>
Date
Mar 18, 2025, 22:21 UTC
Message-ID
<cover.1742336481.git.me@ttaylorr.com>

This short series introduces a few new http.* configuration options to control curl's behavior around TCP keepalive packets. The details are spelled out in the final patch, but the gist is:

  - http.keepAliveIdle specifies how long in seconds to wait on an idle
    connection before beginning to send keepalive packets.
  - http.keepAliveInterval does the same but controls the interval
    between successive keepalive packets.
  - http.keepAliveCount specifies how many keepalive packets to send
    before closing down the connection.

The first two commits of the series are general code clean-up of a couple of small things I noticed while reading through the http.c code, and the final patch implements these new options.

I couldn't think of a great way to test these new configuration settings, and given the simplicity of the final patch I opted for no tests there. But if someone has a good idea of how to test this behavior, please let me know.

In either case, thanks in advance for your review!
Taylor Blau (3):
  http.c: introduce `set_long_from_env()` for convenience
  http.c: inline `set_curl_keepalive()`
  http.c: allow custom TCP keepalive behavior via config
 Documentation/config/http.adoc | 18 ++++++++++++
 http.c                         | 54 +++++++++++++++++++++++++---------
 2 files changed, 58 insertions(+), 14 deletions(-)
base-commit: 683c54c999c301c2cd6f715c411407c413b1d84e
-- 
2.49.0.3.gbb7a4a684c.dirty
Next: Taylor Blau
Message 1 of 21 in “http: support fine-tuning curl's keepalive behavior”
  1. 0/3 http: support fine-tuning curl's keepalive behaviorTaylor Blau, Mar 18, 2025
  2. 1/3 http.c: introduce `set_long_from_env()` for convenienceTaylor Blau, Mar 18, 2025
  3. Elijah NewrenMar 19, 2025
  4. Patrick SteinhardtMar 19, 2025
  5. Taylor BlauMar 19, 2025
  6. 2/3 http.c: inline `set_curl_keepalive()`Taylor Blau, Mar 18, 2025
  7. Elijah NewrenMar 19, 2025
  8. 3/3 http.c: allow custom TCP keepalive behavior via configTaylor Blau, Mar 18, 2025
  9. Patrick SteinhardtMar 19, 2025
  10. Elijah NewrenMar 19, 2025
  11. Taylor BlauMar 19, 2025
  12. 0/4 http: support fine-tuning curl's keepalive behaviorTaylor Blau, Mar 19, 2025
  13. 1/4 http.c: remove unnecessary casts to longTaylor Blau, Mar 19, 2025
  14. 2/4 http.c: introduce `set_long_from_env()` for convenienceTaylor Blau, Mar 19, 2025
  15. Patrick SteinhardtMar 20, 2025
  16. Jeff KingApr 1, 2025
  17. 3/4 http.c: inline `set_curl_keepalive()`Taylor Blau, Mar 19, 2025
  18. Jeff KingApr 1, 2025
  19. 4/4 http.c: allow custom TCP keepalive behavior via configTaylor Blau, Mar 19, 2025
  20. Jeff KingApr 1, 2025
  21. Elijah NewrenMar 19, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.