[Project_owners] HTTP Auth's opening URL

Michael Vincent mv_van_rantwijk at yahoo.com
Thu Oct 6 01:34:08 EDT 2005


Eric Jung wrote:
> Hi Michael,
> 
> --- Michael Vincent <mv_van_rantwijk at yahoo.com> wrote:
> 
>> 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 
> 
> Sorry, I didn't understand you were waiting. Can you please repeat
> what you wanted (unless you did that just below...)
> 
>> location bar and press alt+enter (with and without any of the
>> extensions 
>> installed). That should always open a new tab, right?
>>
> 
> Yes -- regardless of whether or not there are installed extensions.
> Here are two screenshots.
> 
> Without extensions (new profile):
> http://img398.imageshack.us/img398/9152/capture105200561433pm7ot.jpg
> 
> With extensions:
> http://img213.imageshack.us/img213/8002/capture1005200560907pmwithexte.jpg
> 
> Thank you,
> Eric

So why is the location bar empty for both screen shots?

BTW: do you see any JS errors on the JS console (because that can break 
things badly!)?

Michael


More information about the Project_owners mailing list