On Mon, 2006-02-13 at 19:22 -0300, Danniel Willian Nascimento wrote: > Hi Roland, > > It sure helped (I was just thinking how to get over that too =) ), but I > think I did not express myself right. > The problem is when I try to cancel the authentication (like clicking the > CANCEL button or providing > wrong credentials). Even if I provide the wrong credentials for more than 3 > times, > the client still prompts for the uid/pwd. Isn't that supposed to be handled > by > the retry handler?
Danniel, This is the job of the credentials provider to ensure that the same credentials are not retried multiple times. The credentials provide is expected to return null if it does not want HttpClient to retry authentication. Hope this helps Oleg > Btw, you're right, the code is not in the authentication guide. It's in the > Exception Handling > guide. My bad. =) > > > 2006/2/13, Roland Weber <[EMAIL PROTECTED]>: > > > > Hi Danniel, > > > > the retry handler decides how to deal with communication problems. > > A missing authentication is not a communication problem. There is > > no retry handler code in the authentication guide: > > http://jakarta.apache.org/commons/httpclient/authentication.html > > > > If you are repeatedly prompted for a uid/pwd for the same domain, > > make sure you use the same HttpState object for all requests. If > > you don't pass an extra HttpState object (which you don't in the > > code snippet you sent), then you have to use the same HttpClient > > object. HttpClient uses HttpState to store the credentials, as > > mentioned here: > > > > http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/auth/CredentialsProvider.html > > > > hope that helps, > > Roland > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
