views:

1089

answers:

2

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?

A: 

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.

Julian Reschke
Quoting from the RFC 2616 definition: "The chunked encoding modifies the body of a message in order to transfer it as a series of chunks..." . Does this not mean response being sent in multiple chunks?
zkarthik
A: 

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.

zkarthik