mirror: drain probe body to EOF, not capped, so reuse actually works
main·
Commit

A LimitReader cap on the drain defeats its own purpose: if the body exceeds the cap, io.Copy stops before resp.Body reaches EOF, and Go only recycles a connection whose body was read to EOF — so a capped drain is identical to no drain in exactly the case it's meant to handle.
The maxProbeBytes cap on the read path bounds Decode's allocation; draining to io.Discard is O(1) memory, so no cap is needed there. The client Timeout still bounds how long the drain can run.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: 13446af914fa
Checkpoints
Checkpoint 1