Ortwin Glück wrote:
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.
As Roland pointed out, no it won't, not unless you've called HttpMethod.setDoAuthentication(true). I've verified this since Roland told me about it.
Please make sure you set the correct hostname and realm for your credentials.
I'm setting null for both at the moment, this is the way to set a default AFAICS, and I want to get it working withs defaults first. The simpler the better for now.
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.
thanks for the idea!
alex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]