clientParams.setBooleanParameter("http.protocol.expect-continue", true);
// Replace default error retry handler.
final int retryMaxCount = jets3tProperties.getIntProperty("httpclient.retry-max", 5);
clientParams.setParameter(HttpClientParams.RETRY_HANDLER, new HttpMethodRetryHandler() {
public boolean retryMethod(HttpMethod httpMethod, IOException ioe, int executionCount) {
if (executionCount > retryMaxCount) {
if (log.isWarnEnabled()) {
log.warn("Retried connection " + executionCount
+ " times, which exceeds the maximum retry count of " + retryMaxCount);