olegk 2003/10/21 13:13:28
Modified: httpclient/src/java/org/apache/commons/httpclient
HttpMethodBase.java
Log:
Fixed NPE in HttpMethodBase#responseBodyConsumed()
Reported by Tim McCune
Contributed by Oleg Kalnichevski
Reviewed by Michael Becke
Revision Changes Path
1.185 +9 -8
jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java
Index: HttpMethodBase.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/httpclient/src/java/org/apache/commons/httpclient/HttpMethodBase.java,v
retrieving revision 1.184
retrieving revision 1.185
diff -u -r1.184 -r1.185
--- HttpMethodBase.java 20 Oct 2003 22:17:12 -0000 1.184
+++ HttpMethodBase.java 21 Oct 2003 20:13:28 -0000 1.185
@@ -2230,12 +2230,13 @@
// make sure this is the initial invocation of the notification,
// ignore subsequent ones.
responseStream = null;
- responseConnection.setLastResponseInputStream(null);
+ if (responseConnection != null) {
+ responseConnection.setLastResponseInputStream(null);
- if (shouldCloseConnection(responseConnection)) {
- responseConnection.close();
+ if (shouldCloseConnection(responseConnection)) {
+ responseConnection.close();
+ }
}
-
ensureConnectionRelease();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]