| Override of GetMethod that marks the passed HttpRecorder w/ the transition
from HTTP head to body and that forces a close on the http connection.
The actions done in this subclass used to be done by copying
org.apache.commons.HttpMethodBase, overlaying our version in place of the
one that came w/ httpclient. Here is the patch of the difference between
shipped httpclient code and our mods:
-- -1338,6 +1346,12 --
public void releaseConnection() {
+ // HERITRIX always ants the streams closed.
+ if (responseConnection != null)
+ {
+ responseConnection.close();
+ }
+
if (responseStream != null) {
try {
// FYI - this may indirectly invoke responseBodyConsumed.
-- -1959,6 +1973,11 --
this.statusLine = null;
}
}
+ // HERITRIX mark transition from header to content.
+ if (this.httpRecorder != null)
+ {
+ this.httpRecorder.markContentBegin();
+ }
readResponseBody(state, conn);
processResponseBody(state, conn);
} catch (IOException e) {
We're not supposed to have access to the underlying connection object;
am only violating contract because see cases where httpclient is skipping
out w/o cleaning up after itself.
author: stack version: $Revision: 4646 $, $Date: 2006-09-22 17:23:04 +0000 (Fri, 22 Sep 2006) $ |