dev@jsr311.java.net

Re: JSR311: gzip encoding

From: Julian Reschke <julian.reschke_at_gmx.de>
Date: Tue, 31 Mar 2009 10:54:19 +0200

Paul Sandoz wrote:
>> Stephan Koops wrote:
>>> Hi,
>>> -1
>>> If the accept-Encoding allows GZIP, than the JAX-RS runtime could
>>> decide on its own, that it gzip the data. This it could do with all
>>> encodings, that are allowe. So there is no additional annotation
>>> required.
>>> Ot course the runtime must set the content-encoding header, if it
>>> encode the data.
>>> ...
>>
>> Keep in mind that if the runtime handles this, it will also have to
>> worry about Vary, and do rewriting both outgoing *and* incoming ETags
>> (conditional headers!).
>>
>
> Since GZIP is a lossless encoding is it absolutely necessary to rewrite
> the ETags?

Yes, absolutely.

Using GZIP as content coding (not transfer coding) is simply a case of
content negotiation / variant handling, and all content coding specific
rules apply.

There is a related open issues against httpd/mod_deflate (which has the
same problem).

Also, see <http://trac.tools.ietf.org/wg/httpbis/trac/ticket/39>.

Best regards, Julian