fix(ext/fetch): retry on stale pooled HTTP/1.1 connections (#32566)
## Summary
Fixes #31955
When a server shuts down and restarts on the same port, the fetch
client's
connection pool may still hold a stale keep-alive connection. Reusing it
causes
`connection closed before message completed` errors on every other
request.
The existing `is_error_retryable()` only handled HTTP/2 GOAWAY and
REFUSED_STREAM. This PR extends it to also retry on:
- `hyper::Error::is_incomplete_message()` — connection closed before the
message completed (the main error from the issue)
- `io::ErrorKind::ConnectionReset` — TCP RST from a stale pooled
connection
Both are safe to retry because the server never received/processed the
request.
The retry is limited to one attempt (enforced by the existing `Retried`
marker
extension) and only applies to requests with clonable bodies (not
streaming).
Note: despite being reported as a regression in 2.6.6, this issue
reproduces all
the way back to Deno 1.46.0 — it was a long-standing bug, not a
regression.
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>