Skip to content

http: ignore trailing dot when matching NO_PROXY - #66857

Open
lazerg wants to merge 1 commit into
nodejs:mainfrom
lazerg:fix/no-proxy-loopback
Open

lazerg wants to merge 1 commit into
nodejs:mainfrom
lazerg:fix/no-proxy-loopback

Conversation

@lazerg

@lazerg lazerg commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

NO_PROXY matching compared the raw request hostname, so a fully qualified name with a trailing dot like localhost. or example.com. didn't match its NO_PROXY entry and the request was sent through the proxy. This strips a single trailing dot from both the host and the entries before comparing, same as curl and undici (nodejs/undici#5637).

[::1] already goes direct since the brackets are removed before the check. I left IPv4-mapped addresses out, curl and undici don't map those to IPv4 entries either.

Fixes: #66853

Assisted-by: Claude Code
Signed-off-by: lazerg <lazerg2@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Caution

AgentScan found account activity patterns that may be consistent with automation. This is a heuristic, not proof that this pull request was opened by an agent or violates policy. AI-assisted contributions are permitted, but automated tooling must not open pull requests without advance approval, and contributors must personally understand, test, verify, and take responsibility for every submitted change. See the AgentScan analysis, AI use policy, and automation policy for additional context.

@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.50%. Comparing base (8175dc3) to head (fcaaa73).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66857      +/-   ##
==========================================
- Coverage   90.50%   90.50%   -0.01%     
==========================================
  Files         797      797              
  Lines      278193   278225      +32     
  Branches    53453    53466      +13     
==========================================
+ Hits       251771   251799      +28     
+ Misses      16804    16803       -1     
- Partials     9618     9623       +5     
Files with missing lines Coverage Δ
lib/internal/http.js 92.61% <100.00%> (+0.12%) ⬆️

... and 33 files with indirect coverage changes

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

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.

http: NO_PROXY does not match 'localhost.', '[::1]' or IPv4-mapped loopback

1 participant