oglueck 2003/02/25 01:13:56
Modified: httpclient/src/java/org/apache/commons/httpclient
HttpClient.java
Log:
backing out my erronous patch
Revision Changes Path
1.71 +13 -8
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java
Index: HttpClient.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpClient.java,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- HttpClient.java 24 Feb 2003 19:12:06 -0000 1.70
+++ HttpClient.java 25 Feb 2003 09:13:55 -0000 1.71
@@ -552,6 +552,11 @@
);
try {
+ // Catch all possible exceptions to make sure to release the
+ // connection, as although the user may call
+ // Method->releaseConnection(), the method doesn't know about the
+ // connection until HttpMethod.execute() is called.
+
method.setStrictMode(strictMode);
if (!connection.isOpen()) {
@@ -562,12 +567,12 @@
method = new ConnectMethod(method);
}
}
- } finally {
- // make sure to release the
- // connection, as although the user may call
- // Method->releaseConnection(), the method doesn't know about the
- // connection until HttpMethod.execute() is called.
+ } catch (IOException e) {
+ connection.releaseConnection();
+ throw e;
+ } catch (RuntimeException e) {
connection.releaseConnection();
+ throw e;
}
return method.execute(state, connection);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]