Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
4.4.1
-
Windows Server 2008
-
Patch
Description
When instantiating an Executor from an existing HttpClient instance, the Executor doesn't inherit the credentials provider.
Executor(final HttpClient httpclient)
{ super(); this.httpclient = httpclient; this.credentialsProvider = new BasicCredentialsProvider(); this.authCache = new BasicAuthCache(); }For instance, to perform an HTTP request using the Windows integrated authentication, the following will correctly authenticate:
WinHttpClients.createDefault().execute(new HttpGet(...));
But this will not:
Executor.newInstance(defaultWinHttpClient).execute(Request.Get(...))
I think that this behavior is very counter-intuitive and limiting at the same time. When an Executor is instantiated from an HttpClient instance, all configurations from that instance should be taken in account.