You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2014/05/21 11:32:05 UTC

svn commit: r1596520 - /httpcomponents/httpclient/branches/4.3.x/httpclient/src/examples/org/apache/http/examples/client/QuickStart.java

Author: olegk
Date: Wed May 21 09:32:05 2014
New Revision: 1596520

URL: http://svn.apache.org/r1596520
Log:
HTTPCLIENT-1507: clarified behavior of CloseableHttpResponse#close()

Modified:
    httpcomponents/httpclient/branches/4.3.x/httpclient/src/examples/org/apache/http/examples/client/QuickStart.java

Modified: httpcomponents/httpclient/branches/4.3.x/httpclient/src/examples/org/apache/http/examples/client/QuickStart.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/branches/4.3.x/httpclient/src/examples/org/apache/http/examples/client/QuickStart.java?rev=1596520&r1=1596519&r2=1596520&view=diff
==============================================================================
--- httpcomponents/httpclient/branches/4.3.x/httpclient/src/examples/org/apache/http/examples/client/QuickStart.java (original)
+++ httpcomponents/httpclient/branches/4.3.x/httpclient/src/examples/org/apache/http/examples/client/QuickStart.java Wed May 21 09:32:05 2014
@@ -50,9 +50,10 @@ public class QuickStart {
             // The underlying HTTP connection is still held by the response object
             // to allow the response content to be streamed directly from the network socket.
             // In order to ensure correct deallocation of system resources
-            // the user MUST either fully consume the response content  or abort request
-            // execution by calling CloseableHttpResponse#close().
-
+            // the user MUST call CloseableHttpResponse#close() from a finally clause.
+            // Please note that if response content is not fully consumed the underlying
+            // connection cannot be safely re-used and will be shut down and discarded
+            // by the connection manager.
             try {
                 System.out.println(response1.getStatusLine());
                 HttpEntity entity1 = response1.getEntity();