Skip to content

fix: avoid infinite recursion when recording body with Readfrom#86

Merged
samber merged 1 commit intomainfrom
fix-infinite-recursion-readfrom
Feb 6, 2026
Merged

fix: avoid infinite recursion when recording body with Readfrom#86
samber merged 1 commit intomainfrom
fix-infinite-recursion-readfrom

Conversation

@samber
Copy link
Owner

@samber samber commented Feb 6, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 6, 2026 02:19
@samber samber merged commit 53b361f into main Feb 6, 2026
16 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes a critical infinite recursion bug in the bodyWriter.ReadFrom method. The issue occurred when io.Copy was called with a bodyWriter that implements both io.Writer and io.ReaderFrom, causing io.Copy to repeatedly invoke ReadFrom, which in turn called io.Copy again.

Changes:

  • Fixed infinite recursion by wrapping the writer in an anonymous struct that only exposes io.Writer interface

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (9a4d16e) to head (fa5b564).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@    Coverage Diff     @@
##   main   #86   +/-   ##
==========================
==========================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants