ffang opened a new pull request, #3615:
URL: https://github.com/apache/cxf/pull/3615

   …eature
   
   GZIPOutInterceptor only added Vary: Accept-Encoding when it actually 
compressed a response. A response to a client that did not accept gzip was sent 
uncompressed without Vary, although the content coding was selected based on 
the Accept-Encoding request header. RFC 9110 (section 12.5.5) recommends 
sending Vary in that case. Without it, a shared cache may store the 
uncompressed response and serve it to clients that accept gzip.
   
   Vary is now also added to responses that are not compressed because the 
client does not accept gzip, or because they are below the compression 
threshold. Like Content-Encoding, the header is added when the body is written, 
so that it is not lost if the protocol headers are replaced later (e.g. by the 
JAX-RS response headers). If gzip is not permitted, the output stream is 
wrapped without buffering, so flushed streaming responses are not delayed. 
Responses with a content type that is never compressed 
(supportedPayloadContentTypes) and client requests are unchanged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to