commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Becke <be...@u.washington.edu>
Subject Re: Re[2]: [HttpClient] Trying to obtain a realm to send the correct authentication
Date Thu, 04 Mar 2004 13:28:52 GMT
Hi Jorge,

Difficult to say from what you've said.  Please post a wire log showing 
this problem 
<http://jakarta.apache.org/commons/httpclient/logging.html>.

Mike

On Mar 4, 2004, at 3:29 AM, Jorge Morales Pou wrote:

> Hi,
>
>   Something strange is happening to me. I packetsniff a normal request
>   through the browser, and off-course everything goes fine, but when i
>   try to do a connection through httpclient to a protected resource I
>   donŽt get the 401 HTTP header, even more, I donŽt get any hHTTP
>   header at all in the response. Can it be a server problem?
>   I donŽt think it has anything to do with the server, but itŽs so
>   weird that I can`t understand anything?
>
>   Can anybody throw a light on this?
>
>
> ----- [ El 03/03/2004 commons-user@jakarta.apache.org dijo: ] 
> ----------->
>> Hi Jorge,
>
>> There are a couple of options here.
>
>> 1) use a null realm in setCredentials().  This will cause the
>> credentials to match for all realms on the given host.
>> 2) Manually parse the returned 'WWW-Authenticate' header for the 
>> realm.
>
>> #2 is definitely a hack.  This problem is being worked on for the next
>> major HttpClient release (probably 3.0).
>
>> Mike
>
>> Jorge Morales Pou wrote:
>
>>> Hi,
>>>   I have a web-application protected by an ISAPI filter. For loggin
>>>   off users we have implemented a varying realm system, where the
>>>   realm changes from time to time, thus itŽs not always the same.
>>>
>>>   We want to access some protected resources from Java, but we dontŽt
>>>   have a realm to use in the
>>> HttpClient.getState().setCredentials(...)
>>>   We want to make a connection to obtain the realm, and then Create
>>>   the credentials with these realm, and a 
>>> UsernamePasswordCredentials,
>>>   but donŽt know how to do it.
>>>   Is it posible to open a connection, and from the 401 response read
>>>   the realm to use it further?
>>>
>>>   Thanks from Spain.
>>> Saludos,
>>> -----------------------
>>> "No hay mujer fea,
>>>  sólo belleza exótica."
>>> -----------------------
>>> Jorge Morales Pou
>>> Telefónica I+D, Madrid.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>>> commons-user-help@jakarta.apache.org
>>>
>
> ----------------------------------------|
>
>
>
> Saludos,
> -----------------------
> "Es usted la mujer más bella que he visto en mi vida...
>  lo cual no dice mucho en mi favor."
>  GROUCHO MARX
> -----------------------
> Jorge Morales Pou
> jmp07_ARROBA_tid.es
> 913371123
> Telefónica I+D, Madrid.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message