Changeset 856

Show
Ignore:
Timestamp:
2008-03-06 21:17:16 (9 months ago)
Author:
MaierMan
Message:

#523: Download for http password protected site over https fails.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0.x/chrome/content/dta/manager.js

    r838 r856  
    17331733                Ci.nsIProgressEventSink, 
    17341734                Ci.nsIChannelEventSink, 
    1735                 Ci.nsIAuthPrompt, 
    17361735                Ci.nsIFTPEventSink 
    17371736        ], 
     
    17711770        // nsIInterfaceRequestor 
    17721771        getInterface: function DL_getInterface(iid) { 
    1773                 try { 
    1774                         return this.QueryInterface(iid); 
     1772                if (this._interfaces.some(function(i) { return iid.equals(i); })) { 
     1773                        return this; 
     1774                } 
     1775                if (iid.equals(Ci.nsIAuthPrompt)) { 
     1776                        return this.authPrompter; 
     1777                }        
     1778                if (iid.equals(Ci.nsIPrompt)) { 
     1779                        return this.prompter; 
     1780                } 
     1781                throw Components.results.NS_ERROR_NO_INTERFACE; 
     1782        }, 
     1783        get authPrompter() { 
     1784                try { 
     1785                        return WindowWatcherService.getNewAuthPrompter(window) 
     1786                                .QueryInterface(Ci.nsIAuthPrompt); 
    17751787                } 
    17761788                catch (ex) { 
    1777                         Debug.dump("interface not implemented: " + iid, ex); 
     1789                        Debug.log("authPrompter", ex); 
    17781790                        throw ex; 
    17791791                } 
    17801792        }, 
    1781         get authPrompter() { 
    1782                 try { 
    1783                         return WindowWatcherService.getNewAuthPrompter(null) 
    1784                                 .QueryInterface(Ci.nsIAuthPrompt); 
    1785                 } catch (ex) { 
    1786                         Debug.dump("authPrompter", ex); 
     1793        get prompter() { 
     1794                try { 
     1795                        return WindowWatcherService.getNewPrompter(window) 
     1796                                .QueryInterface(Ci.nsIPrompt); 
     1797                } 
     1798                catch (ex) { 
     1799                        Debug.log("prompter", ex); 
    17871800                        throw ex; 
    17881801                } 
    1789         }, 
    1790         // nsIAuthPrompt 
    1791         prompt: function DL_prompt(aDialogTitle, aText, aPasswordRealm, aSavePassword, aDefaultText, aResult) { 
    1792                 return this.authPrompter.prompt( 
    1793                         aDialogTitle, 
    1794                         aText, 
    1795                         aPasswordRealm, 
    1796                         aSavePassword, 
    1797                         aDefaultText, 
    1798                         aResult 
    1799                 ); 
    1800         }, 
    1801  
    1802         promptUsernameAndPassword: function DL_promptUaP(aDialogTitle, aText, aPasswordRealm, aSavePassword, aUser, aPwd) { 
    1803                 return this.authPrompter.promptUsernameAndPassword( 
    1804                         aDialogTitle, 
    1805                         aText, 
    1806                         aPasswordRealm, 
    1807                         aSavePassword, 
    1808                         aUser, 
    1809                         aPwd 
    1810                 ); 
    1811         }, 
    1812         promptPassword: function DL_promptPassword(aDialogTitle, aText, aPasswordRealm, aSavePassword, aPwd) { 
    1813                 return this.authPrompter.promptPassword( 
    1814                         aDialogTitle, 
    1815                         aText, 
    1816                         aPasswordRealm, 
    1817                         aSavePassword, 
    1818                         aPwd 
    1819                 ); 
    18201802        }, 
    18211803