Skip to content

fix(httpclient): clone request before adding trace headers#1290

Merged
giortzisg merged 1 commit into
masterfrom
fix/httpclient-clone-request
Apr 28, 2026
Merged

fix(httpclient): clone request before adding trace headers#1290
giortzisg merged 1 commit into
masterfrom
fix/httpclient-clone-request

Conversation

@giortzisg

@giortzisg giortzisg commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • clone outgoing requests before injecting Sentry tracing headers
  • keep compliant with the contract
  • add a regression test that reuses the same request across multiple calls and verifies headers do not accumulate on the caller request

Resolves SDK-1190

Clone outgoing requests before injecting Sentry tracing headers.
This keeps SentryRoundTripper compliant with the RoundTripper
contract and prevents retries from accumulating duplicate tracing
headers on the caller's request object.

Co-Authored-By: GPT-5 <noreply@example.com>
@linear-code

linear-code Bot commented Apr 28, 2026

Copy link
Copy Markdown

@giortzisg giortzisg requested a review from Litarnus April 28, 2026 11:58
@giortzisg giortzisg merged commit 0bb583e into master Apr 28, 2026
16 checks passed
@giortzisg giortzisg deleted the fix/httpclient-clone-request branch April 28, 2026 12:20
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