hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Madeleine Wright <m.wri...@ru.ac.za>
Subject Re: getting through a proxy server
Date Fri, 08 Oct 2004 14:58:35 GMT
Hi, Eric.

I don't think so.  It's not a windows server.   But I would appreciate 
seeing the code anyway?

Thanks.

Mad

Yuzwa, Erik wrote:

>Madeleine,
>
>Stupid question but is your proxy server using NTLM authentication? 
>
>I had to do some hoop jumping to get NTLM to work properly, but it's working
>now if you need some
>code.
>
>Erik
>
>-----Original Message-----
>From: Madeleine Wright [mailto:m.wright@ru.ac.za] 
>Sent: Friday, October 08, 2004 8:46 AM
>To: Commons HttpClient Project
>Subject: getting through a proxy server
>
>
>Please can someone suggest the simplest way to access a URL 
>programatically through a proxy server?  I'm using HttpClient and the 
>proxy bits of my code look like this (everything else works fine - I can 
>access all sites inside the firewall):
>
>HttpClient client = new HttpClient();
>.................
>client.getHostConfiguration().setProxy(proxyHost, proxyPort);
>Credentials creds = new UsernamePasswordCredentials(userName, password);
>client.getState().setProxyCredentials(realm, proxyHost, defaultcreds);
>.......................
>GetMethod method = new GetMethod(url);
>
>I realize I seem to be supplying proxy host details twice!  But I can't 
>otherwise see how to set the proxy port?  I keep getting an "access 
>denied" message from the proxy server, indicating that I have not 
>authenticated myself.  Does anyone know how I do that other than the 
>method above (I am sure the actual proxy details given are correct).
>
>Thanks.
>
>Mad
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail:
>commons-httpclient-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail:
>commons-httpclient-dev-help@jakarta.apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org
>
>
>  
>

---------------------------------------------------------------------
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