Skip to content

fix: match no-transform directive case-insensitively - #285

Closed
kilisamemarisaaa wants to merge 1 commit into
expressjs:masterfrom
kilisamemarisaaa:codex/cache-control-no-transform-case
Closed

fix: match no-transform directive case-insensitively#285
kilisamemarisaaa wants to merge 1 commit into
expressjs:masterfrom
kilisamemarisaaa:codex/cache-control-no-transform-case

Conversation

@kilisamemarisaaa

Copy link
Copy Markdown
Contributor

Summary

  • match the Cache-Control: no-transform directive case-insensitively, as required by RFC 9111
  • add regression coverage for a mixed-case No-Transform response directive

Root cause

The directive check used a case-sensitive regular expression, so valid spellings such as No-Transform and NO-TRANSFORM did not prevent compression.

Verification

  • npm test (57 passing, 1 pending)
  • npm run lint
  • npm run test-ci (100% statements/functions/lines, 95% branches)
  • standalone A/B reproduction: lowercase, mixed-case, and uppercase directives now all omit Content-Encoding

Fixes #284

@kilisamemarisaaa

Copy link
Copy Markdown
Contributor Author

Closing this duplicate in favor of #286, which covers the same RFC 9111 case-insensitive no-transform fix with broader regression coverage. The issue remains tracked in #284; thanks to @vaibhavmashal for the follow-up.

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.

Cache-Control no-transform directive is matched case-sensitively

1 participant