在 AXIS2 中关闭 HTTP 分块时出现问题
我有一个客户端向我发送没有 HTTP 分块的请求(他们使用内容长度)。 当我的服务器响应时,分块已启用,客户端无法处理此问题 - 尽管他们应该能够处理此问题,因为他们使用的是 HTTP 1.1.....
我尝试通过从 axis2 中删除下面的条目来禁用分块配置文件(axis2.xml),但响应仍然分块返回。
chunked
所以问题是,是否有其他地方启用了分块,从而覆盖了 axis2 设置? 也许在 tomcat 设置中?
网络服务器详细信息 - tomcat 6.0.16、axis2 2.1.3
谢谢 麦克风
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以通过编程方式禁用分块,如下所示:
Options options = new Options();
[...]
options.setProperty(HTTPConstants.CHUNKED, "false");
来源:http://jcesarperez.blogspot.com/2008/10/resolviendo -problemas-de.html
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
如果您为 Web 服务创建了存根,只需执行以下操作:
myStub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED, false);
If you created a stub for your web service, just do this:
myStub._getServiceClient().getOptions().setProperty(HTTPConstants.CHUNKED, false);