hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r546608 - /jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java
Date Tue, 12 Jun 2007 19:24:17 GMT
Author: olegk
Date: Tue Jun 12 12:24:16 2007
New Revision: 546608

URL: http://svn.apache.org/viewvc?view=rev&rev=546608
Log:
Fixed bug in the 'expect: continue' handshake code

Modified:
    jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java

Modified: jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java
URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java?view=diff&rev=546608&r1=546607&r2=546608
==============================================================================
--- jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java
(original)
+++ jakarta/httpcomponents/httpcore/trunk/module-nio/src/main/java/org/apache/http/nio/protocol/ThrottlingHttpClientHandler.java
Tue Jun 12 12:24:16 2007
@@ -312,7 +312,9 @@
                     connState.setInputState(ClientConnState.RESPONSE_RECEIVED);
                     
                     if (connState.getOutputState() == ClientConnState.EXPECT_CONTINUE) {
-                        cancelRequest(conn, connState);
+                        int timeout = connState.getTimeout();
+                        conn.setSocketTimeout(timeout);
+                        conn.resetOutput();
                     }
                 }
                 if (!canResponseHaveBody(request, response)) {
@@ -429,17 +431,6 @@
                 (HttpEntityEnclosingRequest) request,
                 connState,
                 conn);
-    }
-    
-    private void cancelRequest(
-            final NHttpClientConnection conn, 
-            final ClientConnState connState) throws IOException {
-
-        int timeout = connState.getTimeout();
-        conn.setSocketTimeout(timeout);
-
-        conn.resetOutput();
-        connState.resetOutput();
     }
     
     private boolean canResponseHaveBody(



Mime
View raw message