olegk 2004/11/09 11:25:43
Modified: httpclient/src/java/org/apache/commons/httpclient
HttpMethodBase.java
Log:
Fix for a superfluous info message in responseBodyConsumed method
Contributed by Oleg Kalnichevski
Revision Changes Path
1.220 +20 -19
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.219
retrieving revision 1.220
diff -u -r1.219 -r1.220
--- HttpMethodBase.java 19 Oct 2004 18:09:45 -0000 1.219
+++ HttpMethodBase.java 9 Nov 2004 19:25:42 -0000 1.220
@@ -2248,23 +2248,24 @@
// If there is data available, regard the connection as being
// unreliable and close it.
- try {
- if(responseConnection.isResponseAvailable()) {
- boolean logExtraInput =
-
getParams().isParameterTrue(HttpMethodParams.WARN_EXTRA_INPUT);
-
- if(logExtraInput) {
- LOG.warn("Extra response data detected - closing
connection");
- }
- setConnectionCloseForced(true);
- }
- }
- catch (IOException e) {
- LOG.info(e.getMessage());
- responseConnection.close();
- }
if (shouldCloseConnection(responseConnection)) {
responseConnection.close();
+ } else {
+ try {
+ if(responseConnection.isResponseAvailable()) {
+ boolean logExtraInput =
+
getParams().isParameterTrue(HttpMethodParams.WARN_EXTRA_INPUT);
+
+ if(logExtraInput) {
+ LOG.warn("Extra response data detected - closing
connection");
+ }
+ responseConnection.close();
+ }
+ }
+ catch (IOException e) {
+ LOG.warn(e.getMessage());
+ responseConnection.close();
+ }
}
}
this.connectionCloseForced = false;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]