Pauline, Exactly what does not work? I know for a fact that Squid BASIC authentication works, because I regularly test HttpClient against Squid. I am also pretty sure that the code snippet I posted below should work
Oleg On Mon, May 30, 2005 at 06:54:47PM +0200, Pauline CANTALOUP wrote: > > Unfortunately, it seems it doesn't work :( > Anyway, thanks a lot and sorry again ! > > -----Message d'origine----- > De : Oleg Kalnichevski [mailto:[EMAIL PROTECTED] > Envoy? : lundi 30 mai 2005 17:33 > ? : Jakarta Commons Users List > Objet : Re: [HTTPClient] Problems to connect to a proxy > > Pauline, > > This should do the trick > > HttpClient client = new HttpClient(); > List authPrefs = new ArrayList(2); > authPrefs.add(AuthPolicy.DIGEST); > authPrefs.add(AuthPolicy.BASIC); > // This will exclude the NTLM authentication scheme > client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, > authPrefs); > > For details see: > > http://jakarta.apache.org/commons/httpclient/3.0/authentication.html#Alternat > e%20authentication > > Oleg > > On Mon, May 30, 2005 at 05:18:21PM +0200, Pauline CANTALOUP wrote: > > Thanks, but how can I force basic auth ? > > > > -----Message d'origine----- > > De : Oleg Kalnichevski [mailto:[EMAIL PROTECTED] Envoy? : lundi 30 mai > > 2005 15:26 ? : Jakarta Commons Users List Objet : Re: [HTTPClient] > > Problems to connect to a proxy > > > > Pauline, > > > > As far as I can tell all the requests generated by HttpClient look > > perfectly sane. The server simply does not seem to like the > > credentials supplied by the client. Are you sure you are using the > > correct user name / password / domain / host params? Any of these four > > params being invalid will cause the NTLM scheme to fail. > > > > Actually this is the very time I see Squid proxy configured to use > > NTLM authentication. Frankly, I do not know if HttpClient is > > compatible with squid's implementation of NTLM auth. Consider using > > BASIC auth, at least initially, to test the credentials > > > > Oleg > > > > >> "GET http://www.yahoo.fr/ HTTP/1.1[\r][\n]" > > >> "User-Agent: Jakarta Commons-HttpClient/3.0-rc2[\r][\n]" > > >> "Host: www.yahoo.fr[\r][\n]" > > >> "Proxy-Connection: Keep-Alive[\r][\n]" > > >> "[\r][\n]" > > > > << "HTTP/1.0 407 Proxy Authentication Required[\r][\n]" > > << "Server: squid/2.5.STABLE9[\r][\n]" > > << "Mime-Version: 1.0[\r][\n]" > > << "Date: Mon, 30 May 2005 12:40:47 GMT[\r][\n]" > > << "Content-Type: text/html[\r][\n]" > > << "Content-Length: 1462[\r][\n]" > > << "Expires: Mon, 30 May 2005 12:40:47 GMT[\r][\n]" > > << "X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0[\r][\n]" > > << "Proxy-Authenticate: NTLM[\r][\n]" > > << "Proxy-Authenticate: Basic realm="Squid proxy-caching web > server"[\r][\n]" > > << "X-Cache: MISS from ProxyA[\r][\n]" > > << "Proxy-Connection: close[\r][\n]" > > > > >> "GET http://www.yahoo.fr/ HTTP/1.0[\r][\n]" > > >> "User-Agent: Jakarta Commons-HttpClient/3.0-rc2[\r][\n]" > > >> "Proxy-Authorization: NTLM > > >> > TlRMTVNTUAABAAAABlIAAAMAAwAsAAAADAAMACAAAABQQy1DQU5UQUxPVVBUTFM=[\r][\n]" > > >> "Host: www.yahoo.fr[\r][\n]" > > >> "Proxy-Connection: Keep-Alive[\r][\n]" > > >> "[\r][\n]" > > > > << "HTTP/1.0 407 Proxy Authentication Required[\r][\n]" > > << "Server: squid/2.5.STABLE9[\r][\n]" > > << "Mime-Version: 1.0[\r][\n]" > > << "Date: Mon, 30 May 2005 12:40:47 GMT[\r][\n]" > > << "Content-Type: text/html[\r][\n]" > > << "Content-Length: 1462[\r][\n]" > > << "Expires: Mon, 30 May 2005 12:40:47 GMT[\r][\n]" > > << "X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0[\r][\n]" > > << "Proxy-Authenticate: NTLM > > TlRMTVNTUAACAAAAAAAAADAAAAASAgAAE+F7GZvD+bAAAAAAAAAAAAAAAAAwAAAA[\r][\n]" > > << "X-Cache: MISS from ProxyA[\r][\n]" > > << "Proxy-Connection: keep-alive[\r][\n]" > > > > >> "GET http://www.yahoo.fr/ HTTP/1.0[\r][\n]" > > >> "User-Agent: Jakarta Commons-HttpClient/3.0-rc2[\r][\n]" > > >> "Proxy-Authorization: NTLM > > >> TlRMTVNTUAADAAAAGAAYAGAAAAAAAAAAeAAAAAMAAwBAAAAAEQARAEMAAAAMAAwAVAA > > >> AA > > >> AAAAAB4A > > >> AAABlIAAFRMU1BBVUxJTkUuQ0FOVEFMT1VQUEMtQ0FOVEFMT1VQA/uQagaqmRXdJR+B > > >> Bq > > >> xQ4gMONR > > >> a81Qhc[\r][\n]" > > >> "Host: www.yahoo.fr[\r][\n]" > > >> "Proxy-Connection: Keep-Alive[\r][\n]" > > >> "[\r][\n]" > > > > << "HTTP/1.0 407 Proxy Authentication Required[\r][\n]" > > << "Server: squid/2.5.STABLE9[\r][\n]" > > << "Mime-Version: 1.0[\r][\n]" > > << "Date: Mon, 30 May 2005 12:40:47 GMT[\r][\n]" > > << "Content-Type: text/html[\r][\n]" > > << "Content-Length: 1462[\r][\n]" > > << "Expires: Mon, 30 May 2005 12:40:47 GMT[\r][\n]" > > << "X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0[\r][\n]" > > << "Proxy-Authenticate: NTLM[\r][\n]" > > << "Proxy-Authenticate: Basic realm="Squid proxy-caching web > server"[\r][\n]" > > << "X-Cache: MISS from ProxyA[\r][\n]" > > << "Proxy-Connection: close[\r][\n]" > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > D?charge / Disclaimer > > > > Ce message et toutes les pi?ces jointes (ci-apr?s le "message") sont > > confidentiels et ?tablis ? l'intention exclusive des destinataires. > > Toute utilisation ou diffusion non autoris?e est interdite. Tout > > message ?lectronique ?tant susceptible d'alt?ration, > > > > This message and any attachments (the "message") are confidential and > > intended solely for the addressees. Any unauthorised use or > > dissemination is prohibited. E-mails are susceptible to alteration. > > Therefore neither 123Multim?dia nor any of its subsidiari > > > > > > --------------------------------------------------------------------- > > 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] > > > D?charge / Disclaimer > > Ce message et toutes les pi?ces jointes (ci-apr?s le "message") sont > confidentiels et ?tablis ? l'intention exclusive des destinataires. Toute > utilisation ou diffusion non autoris?e est interdite. Tout message > ?lectronique ?tant susceptible d'alt?ration, > > This message and any attachments (the "message") are confidential and > intended solely for the addressees. Any unauthorised use or dissemination is > prohibited. E-mails are susceptible to alteration. Therefore neither > 123Multim?dia nor any of its subsidiari > > > --------------------------------------------------------------------- > 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]
