On Mon, 2006-04-24 at 09:51 +0100, [EMAIL PROTECTED] wrote:
> Thanks Oleg,
> 
> I have downloaded the latest build, but unfortunalty I am still failing to get
> through the proxy.
> I noticed, also the problem described wasn't quite the same as I sent the
> Credentials before i make the first outward call wheras in the example it 
> wasn't
> 
> Attached is the full output.
> I saw on the website that on ntlm1 is supported
> -----------
>  Cannot authenticate with Microsoft IIS using NTLM authentication scheme
> 
> NT Lan Manager (NTLM) authentication is a proprietary, closed 
> challenge/response
> authentication protocol for Microsoft Windows. Only some details about NTLM
> protocol are available through reverse engineering. HttpClient provides 
> limited
> support for what is known as NTLMv1, the early version of the NTLM protocol.
> HttpClient does not support NTLMv2 at all.
> -------------
> 
> Right now I am trying to establish with our sys admins which version we have 
> on
> the firewall.
> Is this the sort of behaviour I would expect if we had NTLMv2?
> 
> Thanks
> 
> Bernadette
> 

Bernadette,

The trouble is that according to what could make out of the wire log
that you had posted, the NTLM credentials were not sent at all. Now
after having looked a little more carefully I see that you are not using
SSL, so the cause of this problem cannot be the bug I was referring to. 

Are you absolutely sure you have posted the _complete_ wire log? From
what I can make out of that log, it appears the session gets cut off
somewhere in the middle before the NTLM authentication is attempted.

Oleg

> 
> Quoting Oleg Kalnichevski <[EMAIL PROTECTED]>:
> 
> > On Fri, 2006-04-21 at 12:16 +0100, [EMAIL PROTECTED] wrote:
> > >
> > > I am attempting to use httpclient 3.0 to via a proxy.
> > >
> > > However I have not been able to get it work.
> > > The proxy server is NT.
> > > I have attempted using both UserPasswordCredentials and NTCredentials.
> > >
> > > Here is the code and output.
> > > And yes i am using the right password.
> > > Any help is appreciated.
> > >
> > > Thanks
> > > Bernadette
> >
> > Bernadette,
> >
> > The problem is likely to have been caused by this bug [1] which has been
> > fixed in the SVN trunk, but the fix has not yet made it into an official
> > release. Please try one of the latest nightly builds [2] and see if that
> > solves the problem
> >
> > [1]http://issues.apache.org/bugzilla/show_bug.cgi?id=38818
> > [2]http://cvs.apache.org/builds/jakarta-commons/nightly/commons-httpclient/
> >
> > Oleg
> >
> > > ---
> > > public String getTest() {
> > >
> > >           String strURL = "http://www.google.com";;
> > >           String response = "";
> > >
> > >           GetMethod get = new GetMethod(strURL);
> > >           try {
> > >
> > >                   // Get HTTP client
> > >                   HttpClient httpclient = new HttpClient();
> > >                   HostConfiguration config = 
> > > httpclient.getHostConfiguration();
> > >                   // add proxy stuff
> > >                   if (prop.isvia_proxy()) {
> > >
> > >                           config.setProxy(prop.getProxy_host(), 
> > > prop.getProxy_port());
> > >
> > >                           AuthScope auth = new AuthScope(null, -1, null, 
> > > null);
> > >                           Credentials creds = null;
> > >                           if (logger.isDebugEnabled()) {
> > >                                   logger.debug("getTest()");
> > >                           }
> > >                           // creds = new 
> > > UsernamePasswordCredentials(prop.getProxy_user(),
> > >                           // prop.getProxy_pass());
> > >
> > >                           creds = new NTCredentials(prop.getProxy_user, 
> > > prop.getProxy_pass(),
> > >                                           prop.getProxy_host(), "IE");
> > >                           httpclient.getState().setProxyCredentials(auth, 
> > > creds);
> > >
> > >
> > >                           List authPrefs = new ArrayList(1);
> > >
> > >                           authPrefs.add(AuthPolicy.NTLM);
> > >
> > >                           
> > > httpclient.getParams().setParameter(AuthPolicy.NTLM, authPrefs);
> > >                           httpclient.getParams().setParameter(
> > >                                           
> > > "http.protocol.expect-continue", new Boolean(true));
> > >
> > >
> > >                           get.setDoAuthentication(true);
> > >                   }
> > >
> > >                   HttpConnectionParams param = 
> > > httpclient.getHttpConnectionManager()
> > >                                   .getParams();
> > >                   param.setConnectionTimeout(120 * 1000);
> > >                   param.setSoTimeout(300 * 1000);
> > >
> > >
> > >
> > >                   int status = httpclient.executeMethod(get);
> > >
> > >   }
> >
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to