Skip to content

inspector: fix compressed responses - #61226

Closed
rubnogueira wants to merge 5 commits into
nodejs:mainfrom
rubnogueira:main
Closed

inspector: fix compressed responses#61226
rubnogueira wants to merge 5 commits into
nodejs:mainfrom
rubnogueira:main

Conversation

@rubnogueira

Copy link
Copy Markdown
Contributor

fix: #61222

Using Chrome DevTools inspector tool, the response of the compressed requests is full of garbled symbols.

This PR implements proper compression decryption if the content-encoding header is returned in the response headers.

Repro here: https://github.com/rubnogueira/nodejs-repro-61222

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/inspector

@nodejs-github-botnodejs-github-bot added http2 Issues or PRs related to the http2 subsystem. inspector Issues and PRs related to the V8 inspector protocol needs-ci PRs that need a full CI run. labels Dec 30, 2025
@rubnogueira

Copy link
Copy Markdown
ContributorAuthor

Tagging you @legendecas because I saw some of your work on the inspector.

@codecov

codecovBot commented Dec 30, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.76543% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.53%. Comparing base (ce2ec3d) to head (061f1a2).
⚠️ Report is 172 commits behind head on main.

Files with missing linesPatch %Lines
lib/internal/inspector/network_http.js98.48%1 Missing ⚠️
lib/internal/inspector/network_http2.js98.48%1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@## main #61226 +/- ##
==========================================
- Coverage 88.54% 88.53% -0.01% 
==========================================
Files 704 704 Lines 208734 208866 +132 Branches 40271 40300 +29 ==========================================
+ Hits 184823 184927 +104 - Misses 15932 15945 +13 - Partials 7979 7994 +15 
Files with missing linesCoverage Δ
lib/internal/inspector/network.js96.89% <100.00%> (+0.93%)⬆️
lib/internal/inspector/network_http.js95.93% <98.48%> (+0.66%)⬆️
lib/internal/inspector/network_http2.js89.32% <98.48%> (+1.58%)⬆️

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

@rubnogueirarubnogueira changed the title fix: zipped responsesinspector: fix compressed responsesDec 31, 2025
@rubnogueira

Copy link
Copy Markdown
ContributorAuthor

I just removed irrelevant code, improved testing/linting, built locally Node binary, and tested against my repro. Rebased first commit message following guidelines.

Please let me know if something is missing since it's my first contribution in this repo.

@legendecaslegendecas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you, LGTM

Comment threadtest/parallel/test-inspector-network-http-compressed.js Outdated
Comment threadtest/parallel/test-inspector-network-http2-compressed.js Outdated
@legendecaslegendecas added commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. http Issues or PRs related to the http subsystem. labels Jan 8, 2026
@rubnogueira

Copy link
Copy Markdown
ContributorAuthor

@legendecas can you please review my last changes? thanks!

@legendecaslegendecas added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Jan 14, 2026
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 14, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@legendecaslegendecas added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 20, 2026
@nodejs-github-botnodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Jan 20, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/61226
✔ Done loading data for nodejs/node/pull/61226
----------------------------------- PR info ------------------------------------
Title inspector: fix compressed responses (#61226)
⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile!
Branch rubnogueira:main -> nodejs:main
Labels http, inspector, http2, author ready, needs-ci, commit-queue-squash
Commits 5
- inspector: fix compressed responses
- inspector: lint code
- inspector: remove irrelevant code
- inspector: remove irrelevant file
- inspector: fix tests and inline
Committers 1
- Ruben Nogueira <ruben.p.nogueira@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/61226
Fixes: https://github.com/nodejs/node/issues/61222
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/61226
Fixes: https://github.com/nodejs/node/issues/61222
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
--------------------------------------------------------------------------------
ℹ This PR was created on Tue, 30 Dec 2025 20:14:26 GMT
✔ Approvals: 2
✔ - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/61226#pullrequestreview-3660965504
✔ - Kohei Ueno (@cola119): https://github.com/nodejs/node/pull/61226#pullrequestreview-3673245165
✘ Last GitHub CI failed
ℹ Last Full PR CI on 2026-01-19T18:02:47Z: https://ci.nodejs.org/job/node-test-pull-request/70893/
- Querying data for job/node-test-pull-request/70893/
✔ Build data downloaded
✔ Last Jenkins CI successful
--------------------------------------------------------------------------------
✔ Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/21187587953

@legendecaslegendecas removed the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Jan 22, 2026
legendecas pushed a commit that referenced this pull request Jan 22, 2026
PR-URL: #61226Fixes: #61222
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
@legendecas

Copy link
Copy Markdown
Member

Landed in 186c7a9

@aduh95aduh95 added dont-land-on-v20.x dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. labels Jan 24, 2026
@aduh95

Copy link
Copy Markdown
Contributor

This PR introduced a flaky test, too bad #61226 (comment) was resumed despite showing the added test failing.

I've opened a revert in #61502.

legendecas pushed a commit to legendecas/node that referenced this pull request Apr 9, 2026
PR-URL: nodejs#61226Fixes: nodejs#61222
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Kohei Ueno <kohei.ueno119@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.commit-queue-squashAdd this label to instruct the Commit Queue to squash all the PR commits into the first one.dont-land-on-v22.xPRs that should not land on the v22.x-staging branch and should not be released in v22.x.dont-land-on-v24.xPRs that should not land on the v24.x-staging branch and should not be released in v24.x.httpIssues or PRs related to the http subsystem.http2Issues or PRs related to the http2 subsystem.inspectorIssues and PRs related to the V8 inspector protocolneeds-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--experimental-network-inspection not working properly with gzip, br, zstd and response

5 participants

@rubnogueira@nodejs-github-bot@legendecas@aduh95@cola119