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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
>> For additional commands, e-mail:
>> [EMAIL PROTECTED]
>> 

----------------------------------------|



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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to