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 — [v7.x] fix(decompress): join a repeated content-encoding header (#5664) by mrityunjay-pandey · Pull Request #6026 · nodejs/undici

Conversation

@mrityunjay-pandey

@mrityunjay-pandey mrityunjay-pandey commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

This relates to...

Backport of #5664 to v7.x.

Rationale

On v7.x, a response that repeats the Content-Encoding header reaches the decompress interceptor as an array, and onResponseStart calls toLowerCase() on it. With the test from #5664 applied to v7.x, the request fails with TypeError: contentEncoding.toLowerCase is not a function.

Changes

  • Cherry-pick of a975197 (git cherry-pick -x). lib/interceptor/decompress.js applied cleanly. The test file only conflicted because v7.x has extra tests at the end of the file, so the new test is appended after them unchanged.

Note: #6024 also appends a test at the end of test/interceptors/decompress.js, so whichever of the two lands second needs a trivial rebase. I'll take care of it.

Features

N/A

Bug Fixes

  • The decompress interceptor joins repeated Content-Encoding field lines (RFC 9110 section 5.3) instead of throwing.

Breaking Changes and Deprecations

N/A

Status

  • I have read and agreed to the Developer's Certificate of Origin
  • Tested
  • Benchmarked (optional)
  • Documented
  • Review ready
  • In review
  • Merge ready

Tested locally on Linux with Node 24: node --test test/interceptors/decompress.js (46 pass), npm run lint and npm run test:unit (1324 tests, 1321 pass, 3 skipped, 0 fail).

Sorry, something went wrong.

Uh oh!

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

All reactions
@luantaraschi @mrityunjay-pandey
fix(decompress): join a repeated content-encoding header (nodejs#5664)
e523ed4
parseHeaders turns a repeated field into an array, and this method's own
JSDoc already types the headers record as string | string[] | undefined.
An array is truthy, so the skip check let it through and toLowerCase threw
a TypeError.

RFC 9110 section 5.3 allows joining repeated field lines with commas, which
produces the single-line form the decompression chain already splits and
handles, including the maxContentEncodings guard.

(cherry picked from commit a975197)
@codecov-commenter

codecov-commenter commented Oct 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.16%. Comparing base (7d60c7b) to head (e523ed4).

Additional details and impacted files
@@           Coverage Diff           @@
##             v7.x    #6026   +/-   ##
=======================================
  Coverage   93.15%   93.16%           
=======================================
  Files         112      112           
  Lines       37626    37632    +6     
=======================================
+ Hits        35052    35058    +6     
  Misses       2574     2574           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

metcoder95
metcoder95 approved these changes Oct 16, 2026
View reviewed changes
@mcollina
mcollina merged commit 14c296f into nodejs:v7.x Oct 17, 2026
37 checks passed

Uh oh!

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

@github-actions github-actions Bot mentioned this pull request Nov 5, 2026
[Release] v7.30.2 #6163
Merged
This was referenced Nov 5, 2026
chore(deps): bump the npm-security-updates group across 1 directory with 2 updates mridang/semantic-release-oci#22
Merged
chore(deps): bump undici from 7.30.1 to 7.30.2 in the npm-security-updates group across 1 directory mridang/semantic-release-crx#3
Merged
chore(deps): bump the npm-security-updates group across 1 directory with 2 updates mridang/webext-save-selection#23
Merged
chore(deps): bump undici from 7.30.1 to 7.30.2 in the npm-security-updates group across 1 directory mridang/serverless-resourcetag-plugin#69
Merged
chore(deps): bump the npm-security-updates group across 1 directory with 2 updates mridang/semantic-release-helm#31
Merged
chore(deps): bump undici from 7.30.1 to 7.30.2 in the npm-security-updates group across 1 directory mridang/serverless-zipinfo-plugin#67
Merged
This was referenced Nov 13, 2026
chore(deps): bump undici from 7.30.1 to 7.30.2 in the npm-security-updates group across 1 directory mridang/commitlint-plugin-conditionals#60
Merged
chore(deps): bump undici from 7.30.1 to 7.30.2 in the npm-security-updates group across 1 directory mridang/action-dependency-insight#76
Merged
chore(deps): bump undici from 7.30.1 to 7.30.2 in the npm-security-updates group across 1 directory mridang/action-commit-lint#77
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@metcoder95 metcoder95 metcoder95 approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

5 participants

@mrityunjay-pandey @codecov-commenter @metcoder95 @mcollina @luantaraschi
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.