Hi,
Most of my web service servers are running .Net and it can't cope with chunked
client requests.
I have, for a long time, used the following to disable chunking:
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setConnectionTimeout( 10000 );
httpClientPolicy.setAllowChunking( false );
httpClientPolicy.setReceiveTimeout( readTimeoutMs );
Client client = org.apache.cxf.frontend.ClientProxy.getClient( port );
HTTPConduit http = ( HTTPConduit ) client.getConduit();
http.setClient( httpClientPolicy );
I now have the need to have TCP KeepAlives, so I preceeded that code with:
Map< String, Object > requestContext = binder.getRequestContext();
requestContext.put( AsyncHTTPConduit.USE_ASYNC, Boolean.TRUE );
But now I'm finding that requests are sometimes being chunked.
This isn't happening very often, but it is happening consistently - i.e. all
the calls I made during testing worked and I've gone live without any problems
- now I'm
finding two requests (that get made every five minutes) fail every time
(because they are chunked).
What steps do I have to take to guarantee that requests are not chunked?
This is using CXF 2.7.4.
Thanks.
Jim