[Project_owners] HTTP Auth's opening URL

Michael Vincent mv_van_rantwijk at yahoo.com
Wed Oct 5 23:35:39 EDT 2005


Eric Jung wrote:
> I was never able to solve this problem (get URL of the site
> requesting HTTP Basic Authentication). I posted here, too:
> 
> http://forums.mozillazine.org/viewtopic.php?t=323516
> 
> and people gave me additional ideas. I've tried everything that 4
> developers thought of (myself, Michael Vincent, Cusser (forum
> moderator), and Captain Caveman), but nothing so far has worked.
> 
> One final last plea for help. My users are begging for a feature
> which requires knowledge of the URL needing HTTP Auth.
> -Eric
> 
> 
> --- Eric Jung <grimholtz at yahoo.com> wrote:
> 
>> Hi,
>>
>> OK, in FF I did the following:
>>
>> onOpenWindow: function(aXULWindow) {
>>   var docShell = aXULWindow.docShell;
>>   var requestor = docShell
>>     .QueryInterface(Components.interfaces.nsIInterfaceRequestor);
>>   var chromeWindow = requestor
>>     .getInterface(Components.interfaces.nsIDOMWindow);
>>   var url = chromeWindow.document.location;
>>   dump("url=" + url + "\n");
>> }
>>
>> chrome.document is an HTMLDocument instance, so I thought just
>> output
>> chromeWindow.document.location or
>> chromeWindow.document.location.href.
>>
>> chromeWindow.document.location is "about:blank" no matter how I
>> open
>> the URL which requires HTTP Auth (from bookmark, from ALT-Enter,
>> from
>> blank tab, etc.)
>>
>>
>>
>> --- Michael Vincent <mv_van_rantwijk at yahoo.com> wrote:
>>
>>> Eric Jung wrote:
>>>> Thanks, I'll try that and see what happens. But I was thinking:
>>> in FF
>>>> if you navigate to, say, google.com and in the address bar type
>> a
>>>> site which requires HTTP Auth (e.g, passwordmaker.org:2082) and
>>> press
>>>> ALT-Enter, the HTTP Auth dialog appears before a new tab even
>>> opens.
>>>
>>> Not in my build, only when I use Ctrl instead of Alt, or
>> something
>>> is 
>>> broken in your copy, or some other extension is causing it.
>>>
>>>> In fact, I checked the URI of the window.opener property of the
>>>> dialog in this case, and it is http://www.google.com, not
>>>> http://passwordmaker.org:2082
>>> That should only happen without Alt+Enter.
>>>
>>> Michael

I am still waiting for you to reply about that ctrl+enter versus 
alt+enter thing. So tell me, what happens when you enter some URL in the 
location bar and press alt+enter (with and without any of the extensions 
installed). That should always open a new tab, right?

Michael


More information about the Project_owners mailing list