mbecke 2003/03/12 17:33:07
Modified: httpclient/src/java/org/apache/commons/httpclient
HttpConnection.java
Log:
"Fixes" problem with tunneled HTTPS connections where they can't be reliably
reopened from within HttpMethodBase. Ensures that tunneled HTTPS connections can only
be used once.
Reviewed by: Oleg Kalnichevski and Jeff Dever
Revision Changes Path
1.51 +13 -7
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java
Index: HttpConnection.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpConnection.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- HttpConnection.java 6 Mar 2003 07:49:03 -0000 1.50
+++ HttpConnection.java 13 Mar 2003 01:33:07 -0000 1.51
@@ -219,9 +219,10 @@
Protocol protocol) {
if (LOG.isDebugEnabled()) {
- LOG.debug("HttpConnectionManager.getConnection: creating connection
for "
- + host + ":" + port + " via " + proxyHost + ":" + proxyPort
- + " using protocol: " + protocol);
+ LOG.debug(
+ "creating connection for " + host + ":" + port + " via "
+ + proxyHost + ":" + proxyPort + " using protocol: " + protocol
+ );
}
if (host == null) {
@@ -916,6 +917,11 @@
*/
public void releaseConnection() {
LOG.trace("enter HttpConnection.releaseConnection()");
+ if (isProxied() && isSecure()) {
+ // we do not have a method for reliably reusing tunneled HTTPS
+ // connections so we want to close them after one use
+ close();
+ }
if (httpConnectionManager != null) {
httpConnectionManager.releaseConnection(this);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]