[Project_owners] HTTP Auth's opening URL

Eric Jung grimholtz at yahoo.com
Wed Oct 5 16:56:00 EDT 2005


--- Michael Vincent <mv_van_rantwijk at yahoo.com> wrote:

> 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?

I don't know. Just the way FF works?? Here's the behavior I see:

1. I type the URL
2. I press alt-enter
3. New tab opens with empty location bar and "Loading..." in the tab
title.
4. HTTP Auth box opens

If I press enter in step 2 instead of alt-enter, of course the URL
remains in the location bar.

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

None. You can confirm this at http://passwordmaker.org:2082

Thank you,
Eric


> 
> Michael
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Project_owners mailing list