Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing property copies #1958

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

seaswalker
Copy link

If we create a AsyncHttpClient instance with below code:

DefaultAsyncHttpClientConfig.Builder cfgBuilder = new DefaultAsyncHttpClientConfig.Builder();
cfgBuilder.setDisableHttpsEndpointIdentificationAlgorithm(true);
AsyncHttpClient client = AsyncHttpClientFactory.getAsyncHttpClient(cfgBuilder.build());

The actual behavior of getAsyncHttpClient method is to call the constructor of our customized AsyncHttpClient:

public CustomizedAsyncHttpClient(AsyncHttpClientConfig config) {
    DefaultAsyncHttpClientConfig.Builder builder = new DefaultAsyncHttpClientConfig.Builder(config));
    // customize the builder
    // ...
    this.client = new DefaultAsyncHttpClient(builder.build();
}

In this circumstance, the disableHttpsEndpointIdentificationAlgorithm option will be ignored, and further leads to unexpected bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant