You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@synapse.apache.org by ru...@apache.org on 2008/04/20 19:44:49 UTC

svn commit: r649945 - /synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/ClientHandler.java

Author: ruwan
Date: Sun Apr 20 10:44:46 2008
New Revision: 649945

URL: http://svn.apache.org/viewvc?rev=649945&view=rev
Log:
Fixing the issue SYNAPSE-231, now synapse neglects the 100 Continue 
response and wait for the actual response from the server as described 
in the HTTP 1.1 specification

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

Modified: synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/ClientHandler.java
URL: http://svn.apache.org/viewvc/synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/ClientHandler.java?rev=649945&r1=649944&r2=649945&view=diff
==============================================================================
--- synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/ClientHandler.java (original)
+++ synapse/trunk/java/modules/transports/src/main/java/org/apache/synapse/transport/nhttp/ClientHandler.java Sun Apr 20 10:44:46 2008
@@ -42,10 +42,10 @@
 import org.apache.http.params.DefaultedHttpParams;
 import org.apache.http.params.HttpParams;
 import org.apache.http.protocol.*;
-import org.apache.synapse.transport.nhttp.util.PipeImpl;
 import org.apache.synapse.transport.base.MetricsCollector;
 import org.apache.synapse.transport.base.threads.WorkerPool;
 import org.apache.synapse.transport.base.threads.WorkerPoolFactory;
+import org.apache.synapse.transport.nhttp.util.PipeImpl;
 
 import java.io.IOException;
 import java.nio.ByteBuffer;
@@ -468,6 +468,17 @@
                 
                 log.error("Received an internal server error : " +
                         response.getStatusLine().getReasonPhrase());
+                return;
+            }
+            case HttpStatus.SC_CONTINUE : {
+
+                if (log.isDebugEnabled()) {
+                    log.debug("Received a 100 Continue response");
+                }
+
+                // according to the HTTP 1.1 specification HTTP status 100 continue implies that
+                // the response will be followed, and the client should just ignore the 100 Continue
+                // and wait for the response
                 return;
             }
             case HttpStatus.SC_OK : {