Skip to content

fix: support wildcard accept-encoding negotiation#194

Open
MFA-G wants to merge 1 commit into
FOSSFORGE:mainfrom
MFA-G:fix/accept-encoding-wildcard
Open

fix: support wildcard accept-encoding negotiation#194
MFA-G wants to merge 1 commit into
FOSSFORGE:mainfrom
MFA-G:fix/accept-encoding-wildcard

Conversation

@MFA-G
Copy link
Copy Markdown

@MFA-G MFA-G commented May 23, 2026

Summary

  • expand Accept-Encoding: * into supported compression encodings during negotiation
  • keep explicitly rejected encodings (for example gzip;q=0) excluded from wildcard expansion
  • add regression coverage for wildcard compression and rejection behavior

Closes #193

Verification

  • npm test -- --runInBand src/http/handlers/compression/compression-handler.spec.ts
  • npm run lint
  • npm run build

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Improved HTTP compression negotiation to correctly handle wildcard (*) Accept-Encoding preferences, properly expanding them to supported compression methods while respecting explicitly rejected encodings.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 23, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: aa5e2aab-abba-423b-9885-e0701bedc489

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@VikramAditya33 VikramAditya33 self-requested a review May 23, 2026 13:50
Copy link
Copy Markdown
Collaborator

@VikramAditya33 VikramAditya33 left a comment

Choose a reason for hiding this comment

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

LGTM, Thank you and well done. Just one thing is consider adding a test for *;q=0 (wildcard explicitly rejected) though this isn't strictly necessary since wildcardQuality > 0 guards against it, but it documents the behavior for future readers.

Also comment under the issue to get assigned

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.

Accept-Encoding: * wildcard is ignored during compression negotiation

3 participants