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

Teamwork / utils / 20765701900
77%
master: 77%

Build:
Build:
LAST BUILD BRANCH: refs/tags/v2.3.2
DEFAULT BRANCH: master
Ran 06 Jan 2026 11:47PM 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%
20765701900

Pull #89

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.
Pull Request #89: Fix request body handling in DoExponentialBackoff

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

5 existing lines in 1 file now uncovered.

1270 of 1646 relevant lines covered (77.16%)

40.67 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
4
63.31
3.82% httputilx/httputilx.go

Uncovered Existing Lines

Lines Coverage ∆ File
5
63.31
3.82% httputilx/httputilx.go
Jobs
ID Job ID Ran Files Coverage
1 20765701900.1 06 Jan 2026 11:47PM UTC 27
77.16
GitHub Action Run
Source Files on build 20765701900
  • Tree
  • List 27
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #89
  • PR Base - master (#20759133771)
  • 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