You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by su...@apache.org on 2011/01/20 07:23:26 UTC

svn commit: r1061129 - /synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java

Author: supun
Date: Thu Jan 20 06:23:26 2011
New Revision: 1061129

URL: http://svn.apache.org/viewvc?rev=1061129&view=rev
Log:
fixing an issue with the message conversion from http 1.1 to HTTP 1.1 in service chaining

Modified:
    synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java

Modified: synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java?rev=1061129&r1=1061128&r2=1061129&view=diff
==============================================================================
--- synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java (original)
+++ synapse/trunk/java/modules/core/src/main/java/org/apache/synapse/core/axis2/Axis2FlexibleMEPClient.java Thu Jan 20 06:23:26 2011
@@ -386,6 +386,13 @@ public class Axis2FlexibleMEPClient {
             mepClient.setCallback(callback);
         }
 
+        // this is a temporary fix for converting messages from HTTP 1.1 chunking to HTTP 1.0.
+        // Without this HTTP transport can block & become unresponsive because we are streaming
+        // HTTP 1.1 messages and HTTP 1.0 require the whole message to caculate the content length
+        if (originalInMsgCtx.isPropertyTrue(NhttpConstants.FORCE_HTTP_1_0)) {
+            synapseOutMessageContext.getEnvelope().toString();
+        }
+
         // with the nio transport, this causes the listener not to write a 202
         // Accepted response, as this implies that Synapse does not yet know if
         // a 202 or 200 response would be written back.