Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

joyeecheung
Copy link
Member

@joyeecheung joyeecheung commented Feb 21, 2025

This relates to...

Refs: nodejs/node#57165

Rationale

The Dispatcher needs some prototype methods from lib/api for EnvHttpProxyAgent, otherwise it's incomplete, and throws a TypeError: this[kClient].connect is not a function when EnvHttpProxyAgent is handling requests inside the Node.js bundle.

Changes

Make the Dispatcher prototype complete in the Node.js bundle.

Features

Bug Fixes

Breaking Changes and Deprecations

Status

The Dispatcher needs some methods from lib/api for EnvHttpProxyAgent,
otherwise it's incomplete.
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina
Copy link
Member

Can you add a test for it?

Copy link
Member

@mertcanaltin mertcanaltin left a comment

Choose a reason for hiding this comment

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

LGTM

@joyeecheung
Copy link
Member Author

Added a test - I didn't use mocks but spin up two servers to try to exercise more paths, in case the mocks hide any real issues in the paths that would be otherwise exercised if used for real. Also I just wrote the test to use them together since nodejs/node#57165 doesn't need them exposed individually.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@mcollina mcollina merged commit a217002 into nodejs:main Feb 26, 2025
28 of 31 checks passed
@github-actions github-actions bot mentioned this pull request Feb 28, 2025
@github-actions github-actions bot mentioned this pull request Mar 12, 2025
ronag added a commit to nxtedition/undici that referenced this pull request Mar 14, 2025
* nodejs/main: (23 commits)
  Bumped v7.5.0 (nodejs#4091)
  Removed clients with unrecoverable errors from the Pool (nodejs#4088)
  feat: Allow disabling autoSelectFamily in an Agent (nodejs#4070)
  chore: update cache tests (nodejs#4027)
  fix: Fix retry-handler.js when retry-after header is a Date (nodejs#4084)
  feat: add mock call history to access request configuration in test (nodejs#4029)
  feat(docs): button to switch dark and light mode (nodejs#4044)
  Bumped v7.4.0 (nodejs#4071)
  fix: fix EnvHttpProxyAgent for the Node.js bundle (nodejs#4064)
  chore: update WPT (nodejs#4062)
  chore: update WPT (nodejs#4028)
  fix: handle missing vary header values (nodejs#4031)
  fix: do not throw unhandled exception when data is undefined in interceptor.reply (nodejs#4036)
  test: fix windows wpt (nodejs#4050)
  feat: mark `EnvHttpProxyAgent` as stable (nodejs#4049)
  don't check AbortSignal maxListeners on some node versions (nodejs#4045)
  feat(docs): copy to clipboard button (nodejs#4037)
  docs: fix incorrect method signature of `onResponseError` (nodejs#4030)
  docs: document about global dispatcher and errors (nodejs#3987) (nodejs#4014)
  chore: update WPT (nodejs#4011)
  ...
@github-actions github-actions bot mentioned this pull request May 12, 2025
@joyeecheung joyeecheung mentioned this pull request Aug 20, 2025
github-actions bot pushed a commit that referenced this pull request Aug 21, 2025
* fix: fix EnvHttpProxyAgent for the Node.js bundle

The Dispatcher needs some methods from lib/api for EnvHttpProxyAgent,
otherwise it's incomplete.

* fixup! fix: fix EnvHttpProxyAgent for the Node.js bundle

(cherry picked from commit a217002)
Uzlopak pushed a commit that referenced this pull request Aug 21, 2025
* fix: fix EnvHttpProxyAgent for the Node.js bundle

The Dispatcher needs some methods from lib/api for EnvHttpProxyAgent,
otherwise it's incomplete.

* fixup! fix: fix EnvHttpProxyAgent for the Node.js bundle

(cherry picked from commit a217002)

Co-authored-by: Joyee Cheung <[email protected]>
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.

4 participants