Skip to content

fix: avoid unsupported handler for skipped compression#404

Draft
Herrtian wants to merge 1 commit into
fastify:mainfrom
Herrtian:codex/fix-supported-encoding-no-compress
Draft

fix: avoid unsupported handler for skipped compression#404
Herrtian wants to merge 1 commit into
fastify:mainfrom
Herrtian:codex/fix-supported-encoding-no-compress

Conversation

@Herrtian

Copy link
Copy Markdown

Fixes #305.

Summary

  • negotiate Accept-Encoding before evaluating no-compression conditions
  • avoid calling onUnsupportedEncoding when a supported encoding is skipped by x-no-compression or a non-compressible content type
  • add regression coverage for both the onSend hook and reply.compress() paths

Checks

  • npm.cmd run lint
  • npm.cmd test

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.

buildRoute(De)Compress doesn't handle non-compressible content if a custom onUnsupported handler is defined

1 participant