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

NTFS Authentication proxy error 407

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.1 Final, 4.1.1
    • 4.2.3
    • HttpClient (classic)
    • None
    • Windows XP

    Description

      I'm using httpClient 4.1.1 (I've tried 4.1 also) but I can't pass my proxy authentication; I'm getting 407 Proxy Error.
      On suggestion of Oleg I've tried to use JCIFS library as a NTLM engine and it works; I've used not last jcifs library but 1.2.25 version because parameter in the "new Type3Messages" doesn't match... the last version of jcifs 1.3.15 needs another parameter called "flag".

      This is my not working code:
      String pc = System.getenv("COMPUTERNAME");
      DefaultHttpClient client = new DefaultHttpClient();
      NTCredentials creds = new NTCredentials("user","password", pc, "domain");
      client.getCredentialsProvider().setCredentials(new AuthScope(AuthScope.ANY), creds);

      This is my working code with jcifs:
      String pc = System.getenv("COMPUTERNAME");
      DefaultHttpClient client = new DefaultHttpClient();
      client.getAuthSchemes().register("ntlm", new NTLMSchemeFactory());
      client.getCredentialsProvider().setCredentials(
      AuthScope.ANY,
      new NTCredentials("user","password", pc, "domain"));

      with:
      class NTLMSchemeFactory implements AuthSchemeFactory {
      public AuthScheme newInstance(final HttpParams params)

      { return new NTLMScheme(new JCIFSEngine()); }

      }

      and JCIFSEngine like specified on http://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.0.x/src/site/apt/ntlm.apt

      Attachments

        Activity

          People

            Unassigned Unassigned
            danieleelia Daniele Elia
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: