Skip to content

feat(http): disable Deno.serve automatic compression by default#35486

Merged
nathanwhit merged 1 commit into
denoland:mainfrom
nathanwhit:codex/serve-compression-default-off
Jun 25, 2026
Merged

feat(http): disable Deno.serve automatic compression by default#35486
nathanwhit merged 1 commit into
denoland:mainfrom
nathanwhit:codex/serve-compression-default-off

Conversation

@nathanwhit

Copy link
Copy Markdown
Member

Summary

This changes Deno.serve so automatic response compression is off by default.

  • flips the runtime default for automatic_compression to false
  • keeps explicit automaticCompression: true as the opt-in path
  • updates DENO_SERVE_AUTOMATIC_COMPRESSION docs so 1/true enable compression by default
  • updates the Deno.serve type docs to show automaticCompression defaults to false
  • adjusts serve tests so compression behavior coverage opts in explicitly, and adds/updates coverage for default-off and env-var behavior

Validation

  • ./tools/format.js cli/args/flags.rs ext/http/lib.rs tests/unit/serve_test.ts cli/tsc/dts/lib.deno.ns.d.ts
  • cargo test -p deno_http compression_tests
  • cargo test unit::serve_test -- httpServerAutomaticCompression --nocapture

@nathanwhit
nathanwhit marked this pull request as ready for review June 24, 2026 20:56
@nathanwhit nathanwhit changed the title Disable Deno.serve automatic compression by default fix(http): disable Deno.serve automatic compression by default Jun 24, 2026
@nathanwhit nathanwhit changed the title fix(http): disable Deno.serve automatic compression by default feat(http): disable Deno.serve automatic compression by default Jun 24, 2026
@nathanwhit
nathanwhit force-pushed the codex/serve-compression-default-off branch from 7a0335f to 0543f98 Compare June 24, 2026 23:21
@nathanwhit
nathanwhit merged commit 57f4d00 into denoland:main Jun 25, 2026
136 checks passed
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.

1 participant