[ https://issues.apache.org/jira/browse/CAMEL-13497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16837195#comment-16837195 ]
Andrea Cosentino commented on CAMEL-13497: ------------------------------------------ 2.24.0 is on vote already. I created the 2.24.1 label > Setting a clientConfig parameter always creates new cookie store per endpoint > ----------------------------------------------------------------------------- > > Key: CAMEL-13497 > URL: https://issues.apache.org/jira/browse/CAMEL-13497 > Project: Camel > Issue Type: Bug > Components: camel-ahc > Affects Versions: 2.23.2 > Reporter: Stephan Siano > Assignee: Stephan Siano > Priority: Minor > Fix For: 3.0.0, 2.23.3, 2.24.1 > > > If a clientConfig parameter is defined for an ahc endpoint, a new cookie > store will be created on the endpoint, regardless of the configuration set to > the clientConfig parameter. > This makes it impossible to have an endpoint without a cookie store, when > this parameter is set (which also means that the clientConfig parameter and > the cookieHandler paramter do not work together). > The root cause for this issue is that AhcComponent.cloneConfig() is called at > several places in the code to create a configuration builder from the > provided configuration. This method is calling new > DefaultAsyncHttpClientConfig.Builder(clientConfig), to create that new > builder, but this call will create a new cookie store on each invocation and > provide it to the new builder. This means even if the cookie store is set to > null in the provided configuration the client for the endpoint will be > created with a cloned configuration, which will then have a new cookie store. -- This message was sent by Atlassian JIRA (v7.6.3#76005)