> OkHttpClient client = new OkHttpClient();
> - URL url = request.getEndpoint().toURL();
> - client.setProxy(proxyForURI.apply(request.getEndpoint()));
> - if (url.getProtocol().equalsIgnoreCase("https")) {
> + client.setConnectTimeout(utils.getConnectionTimeout(),
> TimeUnit.MILLISECONDS);
> + client.setReadTimeout(utils.getSocketOpenTimeout(),
> TimeUnit.MILLISECONDS);
> + // do not follow redirects since https redirects don't work properly
> + // ex. Caused by: java.io.IOException: HTTPS hostname wrong: should be
> + // <adriancole.s3int0.s3-external-3.amazonaws.com>
> + client.setFollowRedirects(false);
nit. you probably want to configure a global OkHttpClient and then do
OkHttpClient requestScoped = global.clone();
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/617/files#r20973431