You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by as...@apache.org on 2008/05/29 13:18:23 UTC

svn commit: r661294 - /synapse/branches/1.2/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/ClientHandler.java

Author: asankha
Date: Thu May 29 04:18:23 2008
New Revision: 661294

URL: http://svn.apache.org/viewvc?rev=661294&view=rev
Log:
fix SYNAPSE-334 by creating a tiny temp buffer to read and discard any CRLF's from a 202 accepted message


Modified:
    synapse/branches/1.2/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/ClientHandler.java

Modified: synapse/branches/1.2/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/ClientHandler.java
URL: http://svn.apache.org/viewvc/synapse/branches/1.2/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/ClientHandler.java?rev=661294&r1=661293&r2=661294&view=diff
==============================================================================
--- synapse/branches/1.2/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/ClientHandler.java (original)
+++ synapse/branches/1.2/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/ClientHandler.java Thu May 29 04:18:23 2008
@@ -382,6 +382,11 @@
                     log.debug("Received a 202 Accepted response");
                 }
 
+                // sometimes, some http clients sends an "\r\n" as the content body with a
+                // HTTP 202 OK.. we will just get it into this temp buffer and ignore it..
+                ContentInputBuffer inputBuffer = new SharedInputBuffer(8, conn, allocator);
+                context.setAttribute(RESPONSE_SINK_BUFFER, inputBuffer);
+
                 // create a dummy message with an empty SOAP envelope and a property
                 // NhttpConstants.SC_ACCEPTED set to Boolean.TRUE to indicate this is a
                 // placeholder message for the transport to send a HTTP 202 to the