Skip to content

Conversation

paolobarbolini
Copy link
Contributor

Motivation

The compression layer always adds Vary: Accept-Encoding to the response headers, even if Vary: Accept-Encoding is already present.

Solution

Checks for the presence of the value before setting it. Ideally this would be done by properly parsing the Vary header, but given the current circumstances I've opted for just checking if the value case insensitively contains accept-encoding.

Closes #570.

@seanmonstar seanmonstar merged commit 0187232 into tower-rs:main Jun 2, 2025
11 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.

Compression layer adds the Vary: Accept-Encoding response header even if it's already present

2 participants