async-http-client
async-http-client copied to clipboard
Add missing property copies
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.