Skip to content

Apache 5 Proxy Issue #5199

@just2evil

Description

@just2evil

Hi,

When using the apache5-connector the use of java system proxies are not working.

The issue is that in the Apache5Connector is does not tell the HttpClientBuilder to turn on the use of system properties via useSystemProperties.

You have the setting for Apache5ClientProperties.USE_SYSTEM_PROPERTIES but when set to true you guys are forgetting to tell the HttpClientBuilder also it needs to use system properties.

This can be achieved by clientBuilder.useSystemProperties()

if (PropertiesHelper.isProperty(config.getProperties(), "jersey.config.apache5.client.useSystemProperties")) {
clientBuilder.useSystemProperties()
}

any where after the HttpClientBuilder clientBuilder = HttpClientBuilder.create(); statement in Apache5Connector.

For now anyone that is trying to use the apache5-connector, use the Apache5HttpClientBuilderConfigurator

Apache5HttpClientBuilderConfigurator apache5HttpClientBuilderConfigurator = (httpClientBuilder) -> {
return httpClientBuilder.useSystemProperties();
};

ClientConfig cc = new ClientConfig();
cc.register(apache5HttpClientBuilderConfigurator);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions