Skip to content

Issue #14138 - Add Vary: Accept-Encoding header when compression is possible#14321

Open
afarber wants to merge 2 commits intojetty:jetty-12.1.xfrom
afarber:14138-vary-accept-encoding
Open

Issue #14138 - Add Vary: Accept-Encoding header when compression is possible#14321
afarber wants to merge 2 commits intojetty:jetty-12.1.xfrom
afarber:14138-vary-accept-encoding

Conversation

@afarber
Copy link
Contributor

@afarber afarber commented Jan 13, 2026

Fixes #14138

  • Move Vary header addition outside the compression check in CompressionHandler
  • Add testVaryHeaderWithoutAcceptEncoding test to verify Vary is present without Accept-Encoding
  • Add testNoVaryHeaderForExcludedMethod test to verify Vary is absent for excluded methods

@afarber afarber force-pushed the 14138-vary-accept-encoding branch 2 times, most recently from 408e8c2 to 4922b15 Compare January 22, 2026 17:25
@afarber afarber force-pushed the 14138-vary-accept-encoding branch 2 times, most recently from c9548c9 to d2e4364 Compare February 7, 2026 17:17
@afarber afarber force-pushed the 14138-vary-accept-encoding branch from d2e4364 to 9b14051 Compare February 21, 2026 09:12
@sbordet sbordet requested review from joakime, lorban and sbordet March 3, 2026 16:46
@sbordet sbordet moved this to 👀 In review in Jetty 12.1.8 Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 👀 In review

Development

Successfully merging this pull request may close these issues.

The Vary: Accept-Encoding response header should always be produced if the request goes through the CompressionHandler

1 participant