hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r358363 - in /jakarta/httpcomponents/trunk: http-client/src/java/org/apache/httpclient/impl/ http-client/src/test/org/apache/httpclient/impl/ http-core/src/java/org/apache/http/impl/ http-core/src/test/org/apache/http/impl/
Date Wed, 21 Dec 2005 19:50:44 GMT
Author: olegk
Date: Wed Dec 21 11:50:25 2005
New Revision: 358363

URL: http://svn.apache.org/viewcvs?rev=358363&view=rev
Log:
Moved AutoCloseInputStream ResponseConsumedWatcher DefaultResponseConsumedWatcher classes
from HttpCore to HttpClient

Added:
    jakarta/httpcomponents/trunk/http-client/src/java/org/apache/httpclient/impl/AutoCloseInputStream.java
      - copied unchanged from r358339, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/AutoCloseInputStream.java
    jakarta/httpcomponents/trunk/http-client/src/java/org/apache/httpclient/impl/DefaultResponseConsumedWatcher.java
      - copied unchanged from r358339, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultResponseConsumedWatcher.java
    jakarta/httpcomponents/trunk/http-client/src/java/org/apache/httpclient/impl/ResponseConsumedWatcher.java
      - copied unchanged from r358339, jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/ResponseConsumedWatcher.java
    jakarta/httpcomponents/trunk/http-client/src/test/org/apache/httpclient/impl/TestAutoCloseInputStream.java
      - copied unchanged from r358339, jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestAutoCloseInputStream.java
    jakarta/httpcomponents/trunk/http-client/src/test/org/apache/httpclient/impl/TestDefaultResponseConsumedWatcher.java
      - copied unchanged from r358339, jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultResponseConsumedWatcher.java
Removed:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/AutoCloseInputStream.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultResponseConsumedWatcher.java
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/ResponseConsumedWatcher.java
    jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestAutoCloseInputStream.java
    jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestDefaultResponseConsumedWatcher.java
Modified:
    jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
    jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestAllImpl.java

Modified: jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java?rev=358363&r1=358362&r2=358363&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/java/org/apache/http/impl/DefaultHttpClientConnection.java
Wed Dec 21 11:50:25 2005
@@ -30,7 +30,6 @@
 package org.apache.http.impl;
 
 import java.io.IOException;
-import java.io.InputStream;
 import java.net.InetAddress;
 import java.net.Socket;
 
@@ -363,13 +362,6 @@
     protected void readResponseBody(
             final HttpMutableResponse response) throws HttpException, IOException {
         HttpMutableEntity entity = this.entitygen.generate(this.datareceiver, response);
-        // if there is a result - ALWAYS wrap it in an observer which will
-        // close the underlying stream as soon as it is consumed, and notify
-        // the watcher that the stream has been consumed.
-        InputStream instream = entity.getContent();
-        instream = new AutoCloseInputStream(
-                instream, new DefaultResponseConsumedWatcher(this, response));
-        entity.setContent(instream);
         response.setEntity(entity);
     }
     

Modified: jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestAllImpl.java
URL: http://svn.apache.org/viewcvs/jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestAllImpl.java?rev=358363&r1=358362&r2=358363&view=diff
==============================================================================
--- jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestAllImpl.java
(original)
+++ jakarta/httpcomponents/trunk/http-core/src/test/org/apache/http/impl/TestAllImpl.java
Wed Dec 21 11:50:25 2005
@@ -40,10 +40,8 @@
         TestSuite suite = new TestSuite();
         suite.addTest(TestHeaderGroup.suite());
         suite.addTest(TestHttpDataReceiverAndTransmitter.suite());
-        suite.addTest(TestAutoCloseInputStream.suite());
         suite.addTest(TestDefaultConnectionReuseStrategy.suite());
         suite.addTest(TestDefaultEntityGenerator.suite());
-        suite.addTest(TestDefaultResponseConsumedWatcher.suite());
         suite.addTest(TestBasicRequest.suite());
         return suite;
     }



Mime
View raw message