如何禁用传输编码:chunked websphere
我们有一个使用基于 IBM JAX-RPC 的 Web 服务在 Websphere 6.1 上运行的 Web 服务。客户端发送的请求没有传输编码的 HTTP 标头:分块(它们指定内容长度)。来自 websphere 的响应始终在 HTTP 标头中包含 Transfer-encoding:chunked。我认为这将导致响应以多个块的形式发送。在服务请求者和服务提供者被许多中介(如防火墙和负载均衡器 (T1/F5))分隔的系统中,这种分块可能会导致显着的延迟。
这个 链接 和此 link 谈论请求分块,但没有提及任何有关响应的内容。
有没有办法配置websphere不添加transfer-encoding:chunked在HTTP标头的响应中?
We have a webservice running on Websphere 6.1 using the IBM JAX-RPC based webservices. Client is sending requests without HTTP header of transfer-encoding:chunked (They specify content-length). The response from websphere always has transfer-encoding:chunked in the HTTP header. I assume this will result in the response being sent in multiple chunks. In a system where the service requester and service provider are separated by many intermediaries (like firewalls and loadbalancers (T1/F5)) this kind of chunking could result in significant latency.
This link and this link talk about request chunking but don't mention anything on response.
Is there a way to configure websphere to not add the transfer-encoding:chunked in the response of the HTTP header?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 websphere 中,块大小由 Web 容器入站通道的传输链中的“写入缓冲区大小”控制。来自他们的文档:
如果需要多次写入来处理对客户端的响应,请将为写入缓冲区大小参数指定的值更改为更适合您的客户端的值。写入缓冲区大小参数控制 Web 容器在发送请求进行处理之前缓冲的每个线程的最大数据量。默认值为 32768 字节,对于大多数应用程序来说已经足够了。如果响应的大小大于写入缓冲区的大小,则响应将被分块并在多个 TCP 写入中写回。
In websphere, the chunk size is controlled by the "Write Buffer Size" in the transport chain of the web container inbound channel. From their documentation:
If multiple writes are required to handle responses to the client, change the value specified for the Write buffer size parameter to a value that is more appropriate for your clients. The Write buffer size parameter controls the maximum amount of data per thread that the Web container buffers before sending the request on for processing. The default value is 32768 bytes, which is sufficient for most applications. If the size of a response is greater than the size of the write buffer, the response is chunked and written back in multiple TCP writes.
我不认为您可以配置 Websphere 来执行此操作,但此外,这应该不重要。我建议阅读 RFC 2616 关于分块编码的内容;它不会做你认为它会做的事。
I don't think you can configure Websphere to do so, but furthermore, it shouldn't matter. I recommend reading what RFC 2616 has to say about chunked encoding; it doesn't do what you think it does.