hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Sutton <adr...@intencha.com>
Subject Re: NTLM Proxy Authentication : still receiving 407
Date Fri, 25 Apr 2003 02:10:42 GMT
Hmm, that sounds a lot like a bug in the proxy server.  I have to  
wonder why you're using NTLM authentication with SQUID but anyway...

My first inclination on problems with HttpClient are notoriously  
inaccurate, so it would be good if you could provide me with a full  
wire log of the transaction as per the instructions at  
http://jakarta.apache.org/commons/httpclient/logging.html

There are so many NTLM complaints that have come through today that  
there must be something wrong with NTLM in HttpClient though.  The log  
should tell us more.

Regards,

Adrian Sutton.

On Friday, April 25, 2003, at 04:19  AM, Fabien Guironnet wrote:

>  Hello,
>
> I'm trying to authenticate with an NTLM Proxy server (SQUID 2.5), but  
> I still get the error message :
> 24 avr. 2003 19:39:23 org.apache.commons.httpclient.HttpMethodBase  
> processAuthenticationResponse
> INFO: Already tried to authenticate to  
> "www.google.com#TlRMTVNTUAACAAAABAAEACgAAACCgkEAu3QkmX3Fo24AAAAAAAAAAEx 
> ZT04=" but still receiving 407.
>
> I don't think the problem come from Squid because I can use IE and  
> NTLM Authorization Proxy Server 0.9.7 (Python) from Dmitry A. > Rozmanov.
> I've tested the 3 NTLM messages generated by HTTPClient (with NTLM  
> Authorization Proxy Server) and they seems to be OK.
> Can the problem come from a connection that isn't keeped alive? or I  
> don't use the HTTPClient correctly?
>
> Here is my code (I've tried HTTPClient package 2.0 Alpha 3 (20030225)  
> and the nightly source drop from 20030423) :
> ///////////////////////// BEGIN ///////////////////////////////
>
> import org.apache.commons.httpclient.*;
> import org.apache.commons.httpclient.methods.*;
> import java.io.IOException;
>
> public class Test{
>
>    public static void main(String[] arg) {          HttpState state =  
> new HttpState();
>        HttpClient client = new HttpClient();
>        NTCredentials cred = new NTCredentials("nom_utilisateur",  
> "mot_passe", "192.168.0.1", "DOMAINE");
>        HostConfiguration host = new HostConfiguration();
>        HttpMethod method = new GetMethod();
>              host.setProxy("192.168.0.2", 3128);
>        host.setHost("www.google.com", 80, "http");
>        client.setHostConfiguration(host);
>        client.getState().setProxyCredentials(null, cred);
>                      try {
>            client.executeMethod(method);
>            System.out.println(method.getStatusCode() + "\n" +  
> method.getResponseBodyAsString());
>        } catch (IOException e) {
>            System.out.println("IOException : " + e.getMessage());
>            return;
>        }
>    }
> }
>
> /////////////////////////////// END /////////////////////////////////
>
>
>
> Thanks for your help!
>
>    Fabien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:  
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:  
> commons-httpclient-dev-help@jakarta.apache.org
>


Mime
View raw message