I think that will work out just fine.  Am I understanding correctly that will 
only prompt the user twice, not endless like Firefox or IE?

Could you send me a link to the beta when its available?  I appreciate it.

Cheers,
Mike


-----Original Message-----
From: Hussein Shafie [mailto:[email protected]]
Sent: Fri 8/31/2007 8:40 AM
To: Santy, Michael
Cc: xmleditor-support at xmlmind.com
Subject: Re: [XXE] re-prompting user for credentials when loading over HTTP 
with        Basic auth
 
Santy, Michael wrote:
> I think I understand what you're getting at.  I dug through the code a 
> bit late last night, and can definately see that its not straightforward 
> as I thought.  Its the Authenticator framework in java that abstracts 
> away some of the details that we need. 
> 
> My assumption is that the actual loading of the remove content is done 
> with the URLUtil class.  When the URL.openConnection() method is called 
> and the server requires authentication, java calls back to the XXE 
> Authenticator module automatically.  Couldn't we modify the 
> openConnection(URL, boolean) method to test if the connection returned 
> is a java.net.HttpURLConnection?  If so, you then have access to the 
> response code and message.

The architecture of XXE does not make this idea easy to implement: 
URL.openConnection and XXE's Authenticator belong to two different, 
``very distant'', code layers.



> What heuristic did you use to workaround this?

If XXE's Authenticator is invoked 10 times in a row to return 
credentials for exactly the same host/port/prompt/scheme, then it is 
probably because the credentials previously returned the 9 preceding 
times were rejected by the server. In such case, XXE stops returning the 
old, cached, credentials and prompts the user one more time.

This seems to work fine with Apache 2.2+mod_dav.

If you want to test that, I can tell you where to download XXE v3.6.2 
final beta this evening or next Monday in the morning.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20070831/1ca59ed2/attachment.htm
 

Reply via email to