Problem turning HTTP Chunking off in AXIS2

帅比萌擦擦* 提交于 2019-12-12 00:51:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!