Class DisableGZIPEncodingInterceptor

  • All Implemented Interfaces:
    javax.ws.rs.ext.WriterInterceptor

    public class DisableGZIPEncodingInterceptor
    extends Object
    implements javax.ws.rs.ext.WriterInterceptor
    This RESTEasy interceptor allows disabling GZIP compression even for methods annotated with @GZIP by removing the Content-Encoding header. RESTEasy always adds "Content-Encoding: gzip" header when it encounters @GZIP annotation, but if the request body is actually sent uncompressed, it violates section 3.1.2.2 of RFC7231. Created by [email protected] on 6/9/17.
    • Constructor Detail

      • DisableGZIPEncodingInterceptor

        public DisableGZIPEncodingInterceptor()
    • Method Detail

      • aroundWriteTo

        public void aroundWriteTo​(javax.ws.rs.ext.WriterInterceptorContext context)
                           throws IOException,
                                  javax.ws.rs.WebApplicationException
        Specified by:
        aroundWriteTo in interface javax.ws.rs.ext.WriterInterceptor
        Throws:
        IOException
        javax.ws.rs.WebApplicationException