Pavel Drasil created CAMEL-6605:
-----------------------------------

             Summary: Custom HttpClientConfigurer makes Basic Authentication 
and Proxy settings ineffective
                 Key: CAMEL-6605
                 URL: https://issues.apache.org/jira/browse/CAMEL-6605
             Project: Camel
          Issue Type: Bug
          Components: camel-http
    Affects Versions: 2.11.1
            Reporter: Pavel Drasil


When custom HttpClientConfigurer is defined for http4-based endpoint as 
described in the component documantation, the basic authentication and proxy 
settings are ignored. I am not sure whether this is a bug or feature, but it 
should be either fixed or documented.

The reason is, that basic authentication and proxy settings are also realized 
using HttpClientConfigurer and the custom one overrides this one in 
org.apache.camel.component.http4.HttpComponent.createEndpoint():
1.) Custom HttpClientConfigurer is detected in the parameters map and the 
parameter is removed from the map (line 188)
2.) Compound HttpClientConfigurer for Basic authentication and Proxy settings 
is created by the createHttpClientConfigurer() method (line 218). The method 
tries to detect also the custom HttpClientConfigurer, but its declaration was 
already removed from the parameters map.
3.) New HttpEndpoint instance is created using the compound 
HttpClientConfigurer for Basic authentication and Proxy settings (line 221)
4.) Custom HttpClientConfigurer is set to the endpoint instance which overrides 
the original one (line 277)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to