On Thursday, July 21, 2011 10:39:30 PM Christopher Cheng wrote: > In the doc, I can see that client has the option to enable/disable chunking. > Is it possible to disable chunking completely on the server side?
>From a CXF standpoint, not really, no. You app server or whatever MAY have settings for it. You would need to check with them. >From within a servlet (which is basically what CXF would be from this standpoint, the only ways to do it would be: 1) Set the "Connection: Close" header on the response. You should be able to fairly easily do that from a CXF interceptor, but you may not WANT to as that would disable the keep-alives and may cause performance issues. 2) Write a CXF interceptor that would replace the servlets OutputStream in the message with a buffer of some sort (ByteArrayOutputStream or our CachedOutputStream) at the beginning of the output chain and then at the end of the chain, use that to set the Content-Length header on the response and copy that data to the real output stream. -- Daniel Kulp [email protected] http://dankulp.com/blog Talend - http://www.talend.com
