[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-commit] r1544 - jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client

Author: gwilkins
Date: 2010-04-21 08:48:13 -0400 (Wed, 21 Apr 2010)
New Revision: 1544

Modified:
   jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java
   jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java
Log:
debug

Modified: jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java
===================================================================
--- jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java	2010-04-21 12:43:24 UTC (rev 1543)
+++ jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client/HttpConnection.java	2010-04-21 12:48:13 UTC (rev 1544)
@@ -214,23 +214,28 @@
 
                         if (!_generator.isComplete())
                         {
-                            InputStream in = _exchange.getRequestContentSource();
-                            if (in != null)
+                            if (_exchange!=null)
                             {
-                                if (_requestContentChunk == null || _requestContentChunk.length() == 0)
+                                InputStream in = _exchange.getRequestContentSource();
+                                if (in != null)
                                 {
-                                    _requestContentChunk = _exchange.getRequestContentChunk();
-                                    _destination.getHttpClient().schedule(_timeout);
+                                    if (_requestContentChunk == null || _requestContentChunk.length() == 0)
+                                    {
+                                        _requestContentChunk = _exchange.getRequestContentChunk();
+                                        _destination.getHttpClient().schedule(_timeout);
 
-                                    if (_requestContentChunk != null)
-                                        _generator.addContent(_requestContentChunk,false);
-                                    else
-                                        _generator.complete();
+                                        if (_requestContentChunk != null)
+                                            _generator.addContent(_requestContentChunk,false);
+                                        else
+                                            _generator.complete();
 
-                                    flushed = _generator.flushBuffer();
-                                    io += flushed;
+                                        flushed = _generator.flushBuffer();
+                                        io += flushed;
+                                    }
                                 }
-                            }
+                                else
+                                    _generator.complete();
+                            }                            
                             else
                                 _generator.complete();
                         }

Modified: jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java
===================================================================
--- jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java	2010-04-21 12:43:24 UTC (rev 1543)
+++ jetty/trunk/jetty-client/src/main/java/org/eclipse/jetty/client/HttpExchange.java	2010-04-21 12:48:13 UTC (rev 1544)
@@ -15,7 +15,6 @@
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.net.SocketTimeoutException;
 import java.util.concurrent.atomic.AtomicInteger;
 
 import org.eclipse.jetty.client.security.SecurityListener;
@@ -823,15 +822,7 @@
         {
             try
             {
-                if (ex instanceof SocketTimeoutException ||
-                    ex.getCause() instanceof SocketTimeoutException)
-                {
-                    Log.debug(ex);
-                    setStatus(HttpExchange.STATUS_EXPIRED);
-                    HttpExchange.this.onExpire();
-                }
-                else
-                    HttpExchange.this.onException(ex);
+                HttpExchange.this.onException(ex);
             }
             finally
             {