Skip to content

fix(retry): forward rawHeaders writes through RetryController - #5727

Merged
metcoder95 merged 2 commits into
nodejs:mainfrom
official-burak:fix/retry-controller-rawheaders-setter
Sep 4, 2026
Merged

fix(retry): forward rawHeaders writes through RetryController#5727
metcoder95 merged 2 commits into
nodejs:mainfrom
official-burak:fix/retry-controller-rawheaders-setter

Conversation

@official-burak

@official-burak official-burak commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Fixes #5726

RetryController forwarded rawHeaders / rawTrailers as getters only. DecompressHandler assigns a filtered list onto controller.rawHeaders when it strips content-encoding, so the documented order compose([retry(), decompress()]) threw:

TypeError: Cannot set property rawHeaders of #<RetryController> which has only a getter

This adds setters that write through to the active connection controller (no-ops before a connection is attached, same as pause/resume).

Tests

  • Before: test/retry-handler-controller-proxy.js failed with the getter-only TypeError; retry composed before decompress can rewrite rawHeaders failed.
  • After: those tests pass, plus the full decompress interceptor file (28), retry-handler (47), and interceptors/retry (16).

Decompress assigns controller.rawHeaders when stripping content-encoding.
The retry proxy only had getters, so compose([retry, decompress]) threw.
@codecov-commenter

codecov-commenter commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.49%. Comparing base (af02617) to head (ecb0aaf).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5727   +/-   ##
=======================================
  Coverage   93.49%   93.49%           
=======================================
  Files         110      110           
  Lines       39050    39061   +11     
=======================================
+ Hits        36510    36521   +11     
  Misses       2540     2540           

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@metcoder95
metcoder95 merged commit 9f62899 into nodejs:main Sep 4, 2026
37 of 38 checks passed
@github-actions github-actions Bot mentioned this pull request Sep 4, 2026
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.

retry + decompress: RetryController exposes read-only rawHeaders, causing TypeError

4 participants