[prev in list] [next in list] [prev in thread] [next in thread] 

List:       httpclient-commons-dev
Subject:    Re: does HttpClient transparently send proxy auth after getting HTTP
From:       Alex Hunsley <alex.hunsley () blueyonder ! co ! uk>
Date:       2004-05-27 14:55:34
Message-ID: 40B60166.1060408 () blueyonder ! co ! uk
[Download RAW message or body]

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: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic