hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Glück <ortwin.glu...@nose.ch>
Subject Re: does HttpClient transparently send proxy auth after getting HTTP 403 code?
Date Thu, 27 May 2004 12:02:08 GMT


Alex Hunsley wrote:
> My main question is: if I don't call setAuthenticationPreemptive(true), 
> and if HttpClient tries to use a proxy and receives an HTTP 403 (proxy 
> auth required) message back, will it transparently then give the proxy 
> auth that I have set, or will it just give me the 403 code it received? 

On a 403 response from the proxy, HttpClient will try to authenticate 
with the proxy by repeating the request, if (and only if) you have set 
credentials that are applicable to the host and realm. If all auth 
attempts fail, you will get the 403 response back as a last resort.

Please make sure you set the correct hostname and realm for your 
credentials.

> p.s. I have had no luck at all finding a simple proxy that is runnable 
> under cygwin or windows that will let me enable basic proxy 
> authorization so I can test this.

Check out Squid, which is available for Cygwin (Web category) and native 
Window (which is kinda not well-supported). Its config file is huge 
(squid can do a lot) but quite straight forward.

HTH

Ortwin Glück

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