Repository navigation
Let the env proxy test's fake proxy answer forwarded requests - #8526
Merged
Merged
Conversation
With --use-env-proxy, Node 22.23 and 24.23 send a plain http:// fetch to the proxy as CONNECT host:80, but Node 26.13 sends it as an absolute-form GET http://... request. The fake proxy in the "managed process networking" test handled only CONNECT, so on Node 26 the request had no answer and both tests timed out. The proxy now also answers a forwarded request, and the test checks that exactly one request for bb-proxy-test.invalid reached it, in either form.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
With
--use-env-proxy, Node 22 and 24 send a plainhttp://fetch to the proxy asCONNECT host:80, but Node 26 sends it as a forwardedGET http://...request. The fake proxy in the "managed process networking" tests (#6394) handled onlyCONNECT. On Node 26 the request got no answer, so both tests timed out.What changed
packages/bb-app/test/index.test.ts: the fake proxy also answers a forwarded request withproxied. Both handlers record the request target, and the test checks that exactly one request reached the proxy:bb-proxy-test.invalid:80(CONNECT) orhttp://bb-proxy-test.invalid/(forwarded). The test still fails if the child does not use the proxy (the.invalidhost cannot resolve) or if loopback goes through the proxy (a second target, andproxiedinstead ofdirect). Test-only change.How you verified
Command:
node ../../node_modules/vitest/vitest.mjs run test/index.test.ts -t "environment proxy"inpackages/bb-app, with each official nodejs.org build.turbo run typecheck lint lint:type-aware test --filter=bb-apppasses on Node 26.13.1. CI tests only Node 22, so CI passes before and after. The first row is the regression check.Fixes #8525