Files
Ravi Mistry 201348e27b remote-curl: retry transient HTTP errors in post_rpc()
Git's existing retry logic only covers HTTP GET requests. However, the
actual data transfer during fetch and clone, as well as on-demand blob
downloads in partial clones, are sent as HTTP POST requests via
post_rpc(), which only retries authentication and immediately aborts on
429 or 5xx.

Extract the retry wait logic from http_request_recoverable() into a
shared http_retry_wait() helper and use it in post_rpc() to retry
transient HTTP errors for read-only services ("git-upload-pack" and
"git-upload-archive"). Do not retry "git-receive-pack" (git push), since
retrying a push POST after a 502 or 504 is not safe if the remote
already processed the request. Also defer reporting RPC errors until
retries are exhausted, and re-attach the "Content-Encoding: gzip" header
when retrying a compressed request.

Signed-off-by: Ravi Mistry <rmistry@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-11-19 10:57:46 -08:00
..
2026-06-28 08:32:36 -07:00
…
2026-01-08 11:02:39 +09:00
…