params.setBooleanParameter(CoreConnectionPNames.TCP_NODELAY,true);
params.setBooleanParameter(CoreConnectionPNames.STALE_CONNECTION_CHECK,false);
params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT,socketTimeout);
params.setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT,connectionTimeout);
DefaultHttpClient localClient = new DefaultHttpClient(connectionManager,params);
localClient.setRedirectStrategy(new DefaultRedirectStrategy());
httpClient = localClient;
}
else
{
connectionManager = null;