问题
I have a client sending me requests without HTTP chunking (they use content-length). When my server responds, chunking is enabled, and the client can't handle this - even though they should be able to as they are using HTTP 1.1.....
I have tried to disable chunking by removing the entry below from the axis2 config file (axis2.xml) but the response is still going back chunked.
chunked
So the question is, is there somewhere else that the chunking is being enabled that is over-riding the axis2 setting? In tomcat setting perhaps?
Webserver details - tomcat 6.0.16, axis2 2.1.3
Thanks Mike
回答1:
you can disable Chunking programatically as follows:
Options options = new Options(); [...] options.setProperty(HTTPConstants.CHUNKED, "false");
Source: http://jcesarperez.blogspot.com/2008/10/resolviendo-problemas-de.html
回答2:
If you created a stub for your web service, just do this:
myStub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED, false);
来源:https://stackoverflow.com/questions/271665/problem-turning-http-chunking-off-in-axis2