mirror of
https://github.com/internetarchive/heritrix3.git
synced 2026-09-23 22:26:01 +00:00
disable automatic redirect handling
This commit is contained in:
@@ -822,6 +822,9 @@ public class FetchHTTP2 extends AbstractFetchHTTP implements Lifecycle {
|
||||
protected RecordingHttpClient getHttpClient() {
|
||||
if (httpClient == null) {
|
||||
httpClient = new RecordingHttpClient(getServerCache());
|
||||
|
||||
// XXX should this in the constructor? in configureRequest()? somewhere else?
|
||||
HttpClientParams.setRedirecting(httpClient.getParams(), false);
|
||||
}
|
||||
|
||||
return httpClient;
|
||||
|
||||
@@ -64,13 +64,13 @@ public class RecordingHttpClient extends DefaultHttpClient {
|
||||
this.setServerCache(serverCache);
|
||||
|
||||
// XXX uhh? see HeritrixHttpMethodRetryHandler ??
|
||||
setHttpRequestRetryHandler(new HttpRequestRetryHandler() {
|
||||
@Override
|
||||
public boolean retryRequest(IOException exception, int executionCount,
|
||||
HttpContext context) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
// setHttpRequestRetryHandler(new HttpRequestRetryHandler() {
|
||||
// @Override
|
||||
// public boolean retryRequest(IOException exception, int executionCount,
|
||||
// HttpContext context) {
|
||||
// return false;
|
||||
// }
|
||||
// });
|
||||
|
||||
// never reuse (no keep-alive)
|
||||
setReuseStrategy(new ConnectionReuseStrategy() {
|
||||
|
||||
Reference in New Issue
Block a user