Friday, October 3, 2008

How to disable chunking/keep-alive when using Synapse

How do you disable chunking/keep-alive? Many users have asked this question through the Synapse/WSO2 ESB mailing lists several times. This is possible through the Property mediator.

Generally chunking is enabled by default. If you need to disable chunking/keep-alive all you have to do is set the property "FORCE_HTTP_1.0" to "TRUE" in the scope axis2 using Property Mediator

<property name="FORCE_HTTP_1.0" value="true"/>

1 comment:

Jorge said...

Hi Evan. i try to do that in ESB 4.0.3 but without success.
In a proxy service I put this two properties:



And look at this message capture using tcpmon:

POST /servicios/v4/AssetsWS.php HTTP/1.0
Content-Type: multipart/related; boundary="MIMEBoundary_54f669c47f4083e2d10bafdca68053da0e5b7ef21980d396"; type="text/xml"; start="<0.44f669c47f4083e2d10bafdca68053da0e5b7ef21980d396@apache.org>"
Accept-Encoding: gzip,deflate
SOAPAction: "urn:AssetsWSAction"
Content-Length: 682
Host: assets.uci.cu:5555
Connection: Keep-Alive
User-Agent: Synapse-HttpComponents-NIO

--MIMEBoundary_54f669c47f4083e2d10bafdca68053da0e5b7ef21980d396
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-ID: <0.44f669c47f4083e2d10bafdca68053da0e5b7ef21980d396@apache.org>



jorgeio
--MIMEBoundary_54f669c47f4083e2d10bafdca68053da0e5b7ef21980d396--