Skip to content

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

Open
official-burak wants to merge 1 commit into
nodejs:mainfrom
official-burak:fix/retry-controller-rawheaders-setter
Open

fix(retry): forward rawHeaders writes through RetryController#5727
official-burak wants to merge 1 commit 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

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.
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

1 participant