You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Qi...@csiro.au on 2008/07/01 01:39:44 UTC
Content-Length missing
Hi, All
One of our servers requests Content-Length in the head. We found
content-length in the head has been cut down by Synapse.
Is there any way to keep Content-length in the head?
Cheers
Bai
Re: Content-Length missing
Posted by "Asankha C. Perera" <as...@wso2.com>.
Bai
First of all you need to subscribe
<http://synapse.apache.org/mail-lists.html> to the Synapse dev mailing
list before you can post.. else you will not see our replies.. Right
now, I have Cc:ed this email directly to you..
> One of our servers requests Content-Length in the head. We found
> content-length in the head has been cut down by Synapse.
>
> Is there any way to keep Content-length in the head?
The "Content-Length" header is whats used by default with HTTP 1.0, and
requires Synapse to buffer the complete message into memory first to
find out how large it will be, as this header needs to be written before
the payload body. For optimal performance, and since most of the systems
in existence today supports HTTP 1.1 which can use the chunked encoding,
Synapse defaults to that - if its client sent a HTTP 1.1 request
initially. This allows Synapse to reply back with "chunks" of payload,
where the size of each chunk is sent followed by the payload of that chunk.
Unless you have encountered a problem with the chunked encoding, I
strongly would suggest to leave it, as its much better in performance.
But you could force a HTTP 1.0 reply back if you set the following
property before the <send/> mediator is invoked.
<syn:property name="FORCE_HTTP_1.0" value="true" scope="axis2" />
asankha
--
Asankha C. Perera
WSO2 - http://wso2.org
http://esbmagic.blogspot.com