APPLICATION_XML_UTF8_TYPE
);
}
protected ApacheHttpClient4 doCreateHttpClientFor(final ConnectionInfo connectionInfo, final XStream xstream) {
final ApacheHttpClient4Config config = new DefaultApacheHttpClient4Config();
config.getSingletons().add(new XStreamXmlProvider(xstream, APPLICATION_XML_UTF8_TYPE));
// set _real_ URL for baseUrl, and not a redirection (typically http instead of https)
config.getProperties().put(PROPERTY_FOLLOW_REDIRECTS, Boolean.FALSE);
applyAuthenticationIfAny(connectionInfo, config);
applyProxyIfAny(connectionInfo, config);
// obey JSSE defined system properties
config.getProperties().put(ApacheHttpClient4Config.PROPERTY_CONNECTION_MANAGER,
new PoolingClientConnectionManager(SchemeRegistryFactory.createSystemDefault()));
final ApacheHttpClient4 client = ApacheHttpClient4.create(config);
// set UA