Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1650

Fluent Executor doesn't inherit auth scheme and creds provider of HttpClient instance

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.4.1
    • 5.0 Alpha1
    • Fluent HC
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            plalx Alexandre
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified