Proxy NTLM Authentication Redirecting to different address fails saying Proxy 
Auth Required.
--------------------------------------------------------------------------------------------

                 Key: HTTPCLIENT-863
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-863
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpClient
    Affects Versions: 4.0 Beta 2
            Reporter: Dhil


It has been discussed.But still I'm not getting the result I want

https://issues.apache.org/jira/browse/HTTPCLIENT-856



I used HTTPClient Snapshot4.0

DefaultHttpClient httpclient = new DefaultHttpClient(); 
        httpclient.getCredentialsProvider().setCredentials(new 
AuthScope("i<p>", 8080,"","ntlm"), new NTCredentials("username", 
"password","","domain")); 
        HttpHost targetHost = new HttpHost("www.verisign.com", 443, "https"); 
        HttpHost proxy = new HttpHost("<ip>", 8080); 
        httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, 
proxy); 
        HttpGet httpget = new HttpGet("/"); 
         
        System.out.println("executing request: " + httpget.getRequestLine()); 
        System.out.println("via proxy: " + proxy); 
        System.out.println("to target: " + targetHost); 
         
        HttpResponse response = httpclient.execute(targetHost, httpget); 
        HttpEntity entity = response.getEntity(); 

        System.out.println("----------------------------------------"); 
        System.out.println(response.getStatusLine()); 
        if (entity != null) { 
            System.out.println("Response content length: " + 
entity.getContentLength()); 
        } 
        if (entity != null) { 
            entity.consumeContent(); 
        } 
         
        // When HttpClient instance is no longer needed, 
        // shut down the connection manager to ensure 
        // immediate deallocation of all system resources 
        httpclient.getConnectionManager().shutdown(); 




It has given response as 


Jul 29, 2009 4:56:49 AM 
org.apache.http.impl.client.AbstractAuthenticationHandler selectScheme 
WARNING: Authentication scheme ntlm not supported 
Jul 29, 2009 4:56:49 AM org.apache.http.impl.client.DefaultRequestDirector 
createTunnelToTarget 
WARNING: Authentication error: Unable to respond to any of these challenges: 
{ntlm=Proxy-Authenticate: NTLM, kerberos=Proxy-Authenticate: Kerberos, 
negotiate=Proxy-Authenticate: Negotiate} 
[ Show ยป ] Dhil added a comment - 28/Jul/09 10:08 PM I am also facing the 
problem .I used DefaultHttpClient httpclient = new DefaultHttpClient();         
httpclient.getCredentialsProvider().setCredentials(new AuthScope("i<p>", 
8080,"","ntlm"), new NTCredentials("username", "password","","domain"));        
 HttpHost targetHost = new HttpHost("www.verisign.com", 443, "https");         
HttpHost proxy = new HttpHost("<ip>", 8080);         
httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);      
   HttpGet httpget = new HttpGet("/");                  
System.out.println("executing request: " + httpget.getRequestLine());         
System.out.println("via proxy: " + proxy);         System.out.println("to 
target: " + targetHost);                  HttpResponse response = 
httpclient.execute(targetHost, httpget);         HttpEntity entity = 
response.getEntity();         
System.out.println("----------------------------------------");         
System.out.println(response.getStatusLine());         if (entity != null) {     
        System.out.println("Response content length: " + 
entity.getContentLength());         }         if (entity != null) {             
entity.consumeContent();         }                  // When HttpClient instance 
is no longer needed,         // shut down the connection manager to ensure      
   // immediate deallocation of all system resources         
httpclient.getConnectionManager().shutdown(); It has given response as Jul 29, 
2009 4:56:49 AM org.apache.http.impl.client.AbstractAuthenticationHandler 
selectScheme WARNING: Authentication scheme ntlm not supported Jul 29, 2009 
4:56:49 AM org.apache.http.impl.client.DefaultRequestDirector 
createTunnelToTarget WARNING: Authentication error: Unable to respond to any of 
these challenges: {ntlm=Proxy-Authenticate: NTLM, kerberos=Proxy-Authenticate: 
Kerberos, negotiate=Proxy-Authenticate: Negotiate} 



  
   


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to