Hi I just tried gzip compression and it appears to be working in some
cases but not in others.
I'm on openjdk 1.7.0.3 and cxf 2.7.3 and tomcat 7.0.27.
On the server side I've set
@GZIP(threshold=128)
on the web services
On the client I've set
cxfClient.getInInterceptors().add(new GZIPInInterceptor());
cxfClient.getOutInterceptors().add(new GZIPOutInterceptor(128));
I'm logging what's going on with the server with :
<bean id="compressGZIPFeature"
class="org.apache.cxf.transport.common.gzip.GZIPFeature"/>
<bean id="loggingFeature"
class="org.apache.cxf.feature.LoggingFeature"/>
<cxf:bus>
<cxf:features>
<ref bean="compressGZIPFeature"/>
<ref bean="loggingFeature"/>
</cxf:features>
</cxf:bus>
What I can see is the client is sending
Headers: {Accept-Encoding=[gzip;q=1.0, identity; q=0.5, *;q=0]}
I can see if I have a large response (over 1k) I'm getting
Headers: {Content-Encoding=[gzip], Vary=[Accept-Encoding]}
The 2 problems I'm having is
1) the 128 seems to have no effect, I even tried '0' as per the
documentation for always on, and it does seem to work. Small data is
just normal / no mention of gzip encoding like the large data
2) The requests being sent by the client do not appear to be gziped,
but honestly I'm not sure how to check or what header to look for.
Have I missed something in the configuration?
thanks
--
Ted.