> +            // key manager)
> +            
> client.setSslSocketFactory(sslContextSupplier.get().getSocketFactory());
> +         } else if (utils.trustAllCerts()) {
> +            
> client.setSslSocketFactory(untrustedSSLContextProvider.get().getSocketFactory());
> +         }
> +      }
> +      return client.open(url);
> +   }
> +
> +   @Override
> +   protected void configureRequestHeaders(HttpURLConnection connection, 
> HttpRequest request) {
> +      super.configureRequestHeaders(connection, request);
> +      // OkHttp does not set the Accept header if not present in the request.
> +      // Make sure we send a flexible one.
> +      if (request.getFirstHeaderOrNull(HttpHeaders.ACCEPT) == null) {
> +         connection.setRequestProperty(HttpHeaders.ACCEPT, "*/*");

nit. probably better to be explicit and add `@Accept` annotations on methods 
that need it.  HttpUrlConnection does a lot of sneaky stuff :)

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/232/files#r8624471

Reply via email to