Skip to content

https: limit proxy CONNECT response headers - #64545

Open
mcollina wants to merge 2 commits into
nodejs:mainfrom
mcollina:fix/https-proxy-connect-header-limit
Open

https: limit proxy CONNECT response headers#64545
mcollina wants to merge 2 commits into
nodejs:mainfrom
mcollina:fix/https-proxy-connect-header-limit

Conversation

@mcollina

@mcollina mcollina commented Jul 16, 2026

Copy link
Copy Markdown
Member
  • enforce the effective HTTP maximum header size while reading HTTPS proxy CONNECT responses
  • use a one-shot readable listener while waiting for additional response data
  • add regression coverage for fragmented, incomplete proxy response headers

Apply the configured maximum header size while reading CONNECT
responses. Rearm the readable listener only once per read pass to avoid
unbounded buffer and listener growth.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/http
  • @nodejs/net

@nodejs-github-bot nodejs-github-bot added https Issues and PRs related to the https subsystem. needs-ci PRs that need a full CI run. labels Jul 16, 2026
@mcollina
mcollina marked this pull request as ready for review July 16, 2026 19:37
@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.
βœ… Project coverage is 90.28%. Comparing base (cf882a7) to head (34ef7aa).
⚠️ Report is 761 commits behind head on main.

Files with missing lines Patch % Lines
lib/https.js 95.83% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64545      +/-   ##
==========================================
+ Coverage   90.24%   90.28%   +0.04%     
==========================================
  Files         739      762      +23     
  Lines      241667   247537    +5870     
  Branches    45550    46690    +1140     
==========================================
+ Hits       218093   223501    +5408     
- Misses      15109    15480     +371     
- Partials     8465     8556      +91     
Files with missing lines Coverage Ξ”
lib/https.js 97.18% <95.83%> (-1.05%) ⬇️

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

@pimterry pimterry added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 17, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 17, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mcollina
mcollina requested a review from joyeecheung July 17, 2026 13:07
Comment thread lib/https.js Outdated
Comment thread lib/https.js Outdated
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
@mcollina
mcollina force-pushed the fix/https-proxy-connect-header-limit branch from 215d5d9 to 34ef7aa Compare August 3, 2026 15:25
@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. label Aug 6, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 6, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@mcollina mcollina added the commit-queue PRs queued for automated landing through the Commit Queue. label Sep 3, 2026
@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Sep 3, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Commit Queue failed

✘ GitHub CI is still running

The pull request was removed from the Commit Queue and labeled commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. . After resolving the failure, remove that label and add commit-queue PRs queued for automated landing through the Commit Queue. to retry.

Full Commit Queue output
- Loading data for nodejs/node/pull/64545
βœ”  Done loading data for nodejs/node/pull/64545
----------------------------------- PR info ------------------------------------
Title      https: limit proxy CONNECT response headers (#64545)
Author     Matteo Collina <matteo.collina@gmail.com> (@mcollina)
Branch     mcollina:fix/https-proxy-connect-header-limit -> nodejs:main
Labels     https, needs-ci, commit-queue
Commits    2
 - https: limit proxy CONNECT response headers
 - Update https.js
Committers 1
 - Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/64545
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/64545
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
--------------------------------------------------------------------------------
   β„Ή  This PR was created on Thu, 16 Jul 2026 19:36:16 GMT
   βœ”  Approvals: 3
   βœ”  - Tim Perry (@pimterry): https://github.com/nodejs/node/pull/64545#pullrequestreview-4722448442
   βœ”  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/64545#pullrequestreview-4731343539
   βœ”  - Joyee Cheung (@joyeecheung) (TSC): https://github.com/nodejs/node/pull/64545#pullrequestreview-4877655248
   ✘  GitHub CI is still running
   β„Ή  Last Full PR CI on 2026-09-02T05:27:18Z: https://ci.nodejs.org/job/node-test-pull-request/76870/
- Querying data for job/node-test-pull-request/76870/
βœ”  Build data downloaded
   βœ”  Last Jenkins CI successful
--------------------------------------------------------------------------------
   βœ”  Aborted `git node land` session in /home/runner/work/node/node/.ncu

View workflow run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. https Issues and PRs related to the https subsystem. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants