GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — http: normalize CONNECT request paths by efekrskl · Pull Request #64876 · nodejs/node

Conversation

@efekrskl

@efekrskl efekrskl commented Jul 31, 2026

Copy link
Copy Markdown
Member

Fixes #34347

Partially a revival of #34412 which was apparently moving in the right direction but got stalled and closed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot

nodejs-github-bot commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http
  • @nodejs/net
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@efekrskl
efekrskl force-pushed the fix/http-connect-path-url branch from 987fc94 to 8172f67 Compare July 31, 2026 16:37
@nodejs-github-bot nodejs-github-bot added http Issues and PRs related to the http subsystem. needs-ci PRs that need a full CI run. labels Jul 31, 2026
anonrig
anonrig reviewed Jul 31, 2026
View reviewed changes
Comment thread lib/_http_client.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

anonrig
anonrig reviewed Jul 31, 2026
View reviewed changes
Comment thread lib/_http_client.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Jul 31, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.28%. Comparing base (a46087d) to head (7cb4008).
⚠️ Report is 1103 commits behind head on main.

Files with missing lines Patch % Lines
lib/_http_client.js 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64876      +/-   ##
==========================================
- Coverage   90.29%   90.28%   -0.02%     
==========================================
  Files         760      790      +30     
  Lines      247061   271991   +24930     
  Branches    46584    51924    +5340     
==========================================
+ Hits       223096   245574   +22478     
- Misses      15437    16906    +1469     
- Partials     8528     9511     +983     
Files with missing lines Coverage Δ
lib/_http_client.js 97.38% <94.44%> (-0.26%) ⬇️

... and 411 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@efekrskl
efekrskl requested a review from anonrig August 1, 2026 12:46
efekrskl added 2 commits August 1, 2026 14:54
@efekrskl
http: normalize CONNECT request paths
82f6499
Signed-off-by: Efe Karasakal <[email protected]>
@efekrskl
http: don't throw in isValidConnectPath
673924c
@efekrskl
efekrskl force-pushed the fix/http-connect-path-url branch from 7cb68d6 to 673924c Compare August 1, 2026 12:55
pimterry
pimterry reviewed Sep 2, 2026
View reviewed changes
Comment thread lib/_http_client.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread lib/_http_client.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread lib/_http_client.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@pimterry

pimterry commented Sep 2, 2026

Copy link
Copy Markdown
Member

Sorry it's taken me so long to get to this. I've put some comments here, but I think generally I'm -0.5 on this. As is, I think it can be a breaking change, and the upside is quite small.

More broadly, it changes the scope of HTTP validation we do in these APIs. Right now we don't do anything similar for other methods - we enforce syntactic correctness (no unescaped spaces, must be correctly framed & parseable) but we don't generally police anything else beyond that. If you want to send random strings as a cookie header, or send GET ??? or Host: ??? then you can (I just tested). We make sure your data gets delivered in an unambiguous form, we leave the interpretation errors to the remote server.

We could change that, it's an interesting idea, but if we're going to break this we might as well do something much larger. And to be honest I think it's not helpful: there's plenty of use cases for sending weird HTTP, notably including testing that your server correctly rejects it. This fits into a broader discussion about node:http vs Fetch APIs, where I think we're slowly aligning towards supporting parallel raw low-level with node:http vs high-level with guardrails fetch.

I think there's a central core we can do here safely and sensibly, roughly: if you specifically pass a URL as the request target and the method is CONNECT, then use the path without any leading slash as the target. No new errors or further validation. The risk of breakage there I think is much smaller (URL usage like this is quite unusual anyway, the correct behaviour was always ambiguous, and it'd only break for servers who exclusively accept the wrong format) and it solves the original issue. What do you think @efekrskl?

gurgunday reacted with thumbs up emoji gurgunday reacted with eyes emoji
All reactions
  • 👍 1 reaction
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

anonrig
anonrig approved these changes Sep 2, 2026
View reviewed changes
@efekrskl
http: simplify the approach
be15e66
@efekrskl

efekrskl commented Sep 16, 2026

Copy link
Copy Markdown
Member Author

@pimterry thanks for the detailed review! Good points, and I agree.

I've narrowed down the change quite a bit to only strip the leading slash from URL derived CONNECT targets. This should keep the fix as surgical as possible while still solving the original issue.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@efekrskl
http: dont use primordials
7cb4008
pimterry
pimterry approved these changes Sep 23, 2026
View reviewed changes

@pimterry pimterry left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

LGTM, thanks @efekrskl!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

efekrskl reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@pimterry pimterry added request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. author ready PRs with CI started, the required approvals, and no outstanding review comments. labels Sep 23, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Sep 23, 2026
@nodejs-github-bot

nodejs-github-bot commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/77796/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@panva panva added the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Sep 24, 2026
@github-actions github-actions Bot added resume-ci-failed Resuming CI with the resume-ci label failed and requires manual intervention. and removed resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. labels Sep 24, 2026
@github-actions

github-actions Bot commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Failed to resume CI

✖ CI job 77796 is not resumable

Full Auto Start CI output
�[36m⠋�[39m Validating Jenkins credentials
�[36m⠋�[39m Validating Jenkins credentials
✔  Jenkins credentials valid
�[36m⠙�[39m Looking for CI runs for pull request 64876
�[36m⠙�[39m Looking for CI runs for pull request 64876
�[36m⠙�[39m Getting PR from nodejs/node/pull/64876
�[36m⠙�[39m Getting reviews from nodejs/node/pull/64876
�[36m⠙�[39m Getting comments from nodejs/node/pull/64876
✔  Found PR CI job 77796
�[36m⠹�[39m Querying data for job/node-test-pull-request/77796/
�[36m⠹�[39m Querying data for job/node-test-pull-request/77796/
�[36m⠹�[39m Querying API for job/node-test-pull-request/77796/
✔  Build data downloaded
   ✖  CI job 77796 is not resumable

View workflow run

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@panva panva removed the resume-ci-failed Resuming CI with the resume-ci label failed and requires manual intervention. label Sep 24, 2026
@nodejs-github-bot

nodejs-github-bot commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/77891/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@panva panva added the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Sep 25, 2026
@github-actions github-actions Bot removed the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Sep 25, 2026
@nodejs-github-bot

nodejs-github-bot commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/77914/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95 aduh95 added the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Sep 25, 2026
@panva panva removed the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Sep 26, 2026
@nodejs-github-bot

nodejs-github-bot commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/77947/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@panva panva added commit-queue-squash PRs the Commit Queue should land as one squashed commit. commit-queue PRs queued for automated landing through the Commit Queue. labels Sep 26, 2026
@nodejs-github-bot
nodejs-github-bot merged commit c0681e5 into nodejs:main Sep 26, 2026
92 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

Landed in c0681e5

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 26, 2026
aduh95 pushed a commit that referenced this pull request Sep 27, 2026
@efekrskl @aduh95
http: normalize CONNECT request paths
3d9bdd4
Signed-off-by: Efe Karasakal <[email protected]>
PR-URL: #64876
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
HoonDongKang pushed a commit to HoonDongKang/node that referenced this pull request Sep 28, 2026
@efekrskl @HoonDongKang
http: normalize CONNECT request paths
fa81102
Signed-off-by: Efe Karasakal <[email protected]>
PR-URL: nodejs#64876
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
aduh95 pushed a commit that referenced this pull request Sep 28, 2026
@efekrskl @aduh95
http: normalize CONNECT request paths
9819b0c
Signed-off-by: Efe Karasakal <[email protected]>
PR-URL: #64876
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
@github-actions github-actions Bot mentioned this pull request Oct 5, 2026
2026-10-07, Version 26.11.0 (Current) #66546
Merged
aduh95 pushed a commit that referenced this pull request Oct 23, 2026
@efekrskl @aduh95
http: normalize CONNECT request paths
01919a6
Signed-off-by: Efe Karasakal <[email protected]>
PR-URL: #64876
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
aduh95 pushed a commit that referenced this pull request Oct 28, 2026
@efekrskl @aduh95
http: normalize CONNECT request paths
4fc8c3b
Signed-off-by: Efe Karasakal <[email protected]>
PR-URL: #64876
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
@leapmux-renovate leapmux-renovate Bot mentioned this pull request Nov 1, 2026
chore(deps): Update Node.js to v26 leapmux/leapmux#578
Merged
aduh95 pushed a commit that referenced this pull request Nov 11, 2026
@efekrskl @aduh95
http: normalize CONNECT request paths
d266067
Signed-off-by: Efe Karasakal <[email protected]>
PR-URL: #64876
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
@github-actions github-actions Bot mentioned this pull request Nov 20, 2026
2026-11-30, Version 24.23.0 'Krypton' (LTS) #67663
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pimterry pimterry pimterry approved these changes
@anonrig anonrig anonrig approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-squash PRs the Commit Queue should land as one squashed commit. http Issues and PRs related to the http subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Passing a URL instance with a CONNECT method results in an invalid path

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@efekrskl @nodejs-github-bot @pimterry @anonrig @panva @aduh95
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.