hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r775455 - in /httpcomponents/oac.hc3x/trunk: release_notes.txt src/java/org/apache/commons/httpclient/HttpMethodBase.java src/java/org/apache/commons/httpclient/HttpMethodDirector.java
Date Sat, 16 May 2009 12:28:40 GMT
Author: olegk
Date: Sat May 16 12:28:40 2009
New Revision: 775455

URL: http://svn.apache.org/viewvc?rev=775455&view=rev
Log:
HTTPCLIENT-848: connections not released when SSL tunneling fails

Modified:
    httpcomponents/oac.hc3x/trunk/release_notes.txt
    httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
    httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java

Modified: httpcomponents/oac.hc3x/trunk/release_notes.txt
URL: http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/release_notes.txt?rev=775455&r1=775454&r2=775455&view=diff
==============================================================================
--- httpcomponents/oac.hc3x/trunk/release_notes.txt (original)
+++ httpcomponents/oac.hc3x/trunk/release_notes.txt Sat May 16 12:28:40 2009
@@ -1,5 +1,8 @@
 Changes since 3.1 Final
 
+* [HTTPCLIENT-848] - Connections not released when SSL tunneling fails.
+           Contributed by Oleg Kalnichevski <olegk at apache.org>
+
 * [HTTPCLIENT-837] - Fixed problem with the wire log skipping zero byte values 
   if read one byte at a time.
            Contributed by Kirill Safonov <ksafonov at swiftteams.com>

Modified: httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
URL: http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java?rev=775455&r1=775454&r2=775455&view=diff
==============================================================================
--- httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
(original)
+++ httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
Sat May 16 12:28:40 2009
@@ -2493,12 +2493,14 @@
     void fakeResponse(
         StatusLine statusline, 
         HeaderGroup responseheaders,
+        HttpConnection conn,
         InputStream responseStream
     ) {
         // set used so that the response can be read
         this.used = true;
         this.statusLine = statusline;
         this.responseHeaders = responseheaders;
+        this.responseConnection = conn;
         this.responseBody = null;
         this.responseStream = responseStream;
     }

Modified: httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
URL: http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java?rev=775455&r1=775454&r2=775455&view=diff
==============================================================================
--- httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
(original)
+++ httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/HttpMethodDirector.java
Sat May 16 12:28:40 2009
@@ -516,7 +516,6 @@
             this.connectMethod = null;
             return true;
         } else {
-            this.conn.close();
             return false;
         }
     }
@@ -551,6 +550,7 @@
             ((HttpMethodBase) method).fakeResponse(
                 this.connectMethod.getStatusLine(),
                 this.connectMethod.getResponseHeaderGroup(),
+                conn,
                 this.connectMethod.getResponseBodyAsStream()
             );
             method.getProxyAuthState().setAuthScheme(



Mime
View raw message