jsr339-experts@jax-rs-spec.java.net

[jsr339-experts] Re: Gzipping Interceptors

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Sat, 27 Oct 2012 16:41:49 +0200

The examples in the spec illustrate JAX-RS APIs not any particular feature implemented with these APIs. So I think we should keep the examples simplistic in the spec. The features you're talking about will be most likely provided by more skilled developers anyway.

Marek

On Oct 26, 2012, at 10:59 PM, Jan Algermissen <jan.algermissen_at_nordsc.com> wrote:

> Hi,
>
> Section 4.2.6 correctly says:
>
> "Content encoding is the responsibility of the application. Application-supplied entity providers MAY per- form such encoding and manipulate the HTTP headers accordingly."
>
> Section 6.3 then provides the gzip example for writer interceptors but does not set the corresponding HTTP header. It also does not modify the ETag header, should one be present.
>
> The later I am currently checking up on, but I am currently quite convinced the Etag should be modified to achieve correct cache behavior.
>
> Bothe (or at least the former) cases should IMHO be shown or at least noted as a comment, e.g. // ...adjust Content-Encoding and ETag response headers.
>
> As it stands the example can be quite misleading to developers without deep interest in HTTP mechanics (that is almost all developers).
>
> Thoughts?
>
> Jan
>
>