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

Merged
merged 1 commit into from
May 29, 2024
Merged

Conversation

seaswalker
Copy link
Contributor

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.

@hyperxpro hyperxpro merged commit e3cb7fe into AsyncHttpClient:main May 29, 2024
3 checks passed
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.

2 participants