зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1136055 - 'Save link as' does not follow HTTP 302 response / redirection. r=gijs
--HG-- extra : rebase_source : e9add66a53f8f2627ed08d15e8462653563edd85
This commit is contained in:
Родитель
b56e92700c
Коммит
1b37d7f28f
|
@ -1287,12 +1287,18 @@ nsContextMenu.prototype = {
|
|||
}
|
||||
}
|
||||
|
||||
// set up a channel to do the saving
|
||||
// setting up a new channel for 'right click - save link as ...'
|
||||
// ideally we should use:
|
||||
// * doc - as the loadingNode, and/or
|
||||
// * this.principal - as the loadingPrincipal
|
||||
// for now lets use systemPrincipal to bypass mixedContentBlocker
|
||||
// checks after redirects, see bug: 1136055
|
||||
var ioService = Cc["@mozilla.org/network/io-service;1"].
|
||||
getService(Ci.nsIIOService);
|
||||
var principal = Services.scriptSecurityManager.getSystemPrincipal();
|
||||
var channel = ioService.newChannelFromURI2(makeURI(linkURL),
|
||||
null, // aLoadingNode
|
||||
this.principal, // aLoadingPrincipal
|
||||
principal, // aLoadingPrincipal
|
||||
null, // aTriggeringPrincipal
|
||||
Ci.nsILoadInfo.SEC_NORMAL,
|
||||
Ci.nsIContentPolicy.TYPE_OTHER);
|
||||
|
|
Загрузка…
Ссылка в новой задаче