Skip to content

Commit

Permalink
Applying change to vary header
Browse files Browse the repository at this point in the history
  • Loading branch information
joakime committed Aug 21, 2024
1 parent 96aa234 commit 3bf5979
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ public boolean handle(final Request request, final Response response, final Call
decompressionRequest = newDecompressionRequest(request, decompressEncoding, config);
}

if (compressEncoding != null && config.getVary() != null)
{
// The response may vary based on the presence or lack of Accept-Encoding.
response.getHeaders().ensureField(config.getVary());
}

// Wrap the response and callback IFF we can be deflated and will try to deflate
if (compressEncoding != null)
{
if (config.getVary() != null)
{
// The response may vary based on the presence or lack of Accept-Encoding.
response.getHeaders().ensureField(config.getVary());
}

Response compression = newCompressionResponse(this, request, response, callback, compressEncoding, config);
compressionResponse = compression;
if (compression instanceof Callback dynamicCallback)
Expand Down

0 comments on commit 3bf5979

Please sign in to comment.