• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Teamwork / utils / 20765670668
77%
master: 77%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v2.3.2
DEFAULT BRANCH: master
Ran 06 Jan 2026 11:45PM UTC
Jobs 1
Files 27
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Jan 2026 11:45PM UTC coverage: 77.157% (+0.3%) from 76.881%
20765670668

push

github

rafaeljusto
Fix request body handling in DoExponentialBackoff

Previously, DoExponentialBackoff relied on Seek to reset request bodies
between retries. This approach failed when bodies didn't implement Seek
or when req.GetBody wasn't set (e.g., manually wrapped io.NopCloser),
causing "ContentLength=N with Body length 0" errors on retry attempts.

The issue occurred because req.Clone() reuses the exhausted body reader
without resetting it, leading to empty bodies on subsequent attempts
while ContentLength remained set from the original request.

Now read the entire request body upfront and create fresh io.Readers
for each retry attempt. This ensures:
- Body is always available for all retry attempts
- ContentLength is correctly set to match the actual body
- Works reliably with all io.Reader types, not just seekable ones

Added test case with io.NopCloser-wrapped bytes.Buffer that validates
both body content and ContentLength matching across retry attempts.

13 of 17 new or added lines in 1 file covered. (76.47%)

1270 of 1646 relevant lines covered (77.16%)

40.65 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
63.31
3.82% httputilx/httputilx.go
Jobs
ID Job ID Ran Files Coverage
1 20765670668.1 06 Jan 2026 11:45PM UTC 27
77.16
GitHub Action Run
Source Files on build 20765670668
  • Tree
  • List 27
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 067a4644 on github
  • Prev Build on master (#20759133771)
  • Next Build on httpx-exp-backoff (#20778061676)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc