Merge branch '3.0'
This commit is contained in:
commit
c36a2b32b1
2 changed files with 18 additions and 1 deletions
|
@ -44,6 +44,11 @@ Zotero.HTTP = new function() {
|
||||||
channel.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
|
channel.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
|
||||||
channel.forceAllowThirdPartyCookie = true;
|
channel.forceAllowThirdPartyCookie = true;
|
||||||
|
|
||||||
|
// Set charset
|
||||||
|
if (responseCharset) {
|
||||||
|
channel.contentCharset = responseCharset;
|
||||||
|
}
|
||||||
|
|
||||||
// Don't cache GET requests
|
// Don't cache GET requests
|
||||||
xmlhttp.channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE;
|
xmlhttp.channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE;
|
||||||
|
|
||||||
|
@ -104,6 +109,11 @@ Zotero.HTTP = new function() {
|
||||||
channel.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
|
channel.QueryInterface(Components.interfaces.nsIHttpChannelInternal);
|
||||||
channel.forceAllowThirdPartyCookie = true;
|
channel.forceAllowThirdPartyCookie = true;
|
||||||
|
|
||||||
|
// Set charset
|
||||||
|
if (responseCharset) {
|
||||||
|
channel.contentCharset = responseCharset;
|
||||||
|
}
|
||||||
|
|
||||||
if (headers) {
|
if (headers) {
|
||||||
if (typeof headers == 'string') {
|
if (typeof headers == 'string') {
|
||||||
var msg = "doPost() now takes a headers object rather than a requestContentType -- update your code";
|
var msg = "doPost() now takes a headers object rather than a requestContentType -- update your code";
|
||||||
|
|
|
@ -402,9 +402,16 @@ Zotero.Translate.SandboxManager = function(sandboxLocation) {
|
||||||
this.parseFromString = function(str, contentType) _DOMParser.parseFromString(str, contentType);
|
this.parseFromString = function(str, contentType) _DOMParser.parseFromString(str, contentType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
this.sandbox.DOMParser.__exposedProps__ = {"prototype":"r"};
|
this.sandbox.DOMParser.__exposedProps__ = {"prototype":"r"};
|
||||||
this.sandbox.DOMParser.prototype = {};
|
this.sandbox.DOMParser.prototype = {};
|
||||||
|
this.sandbox.XMLSerializer = function() {
|
||||||
|
var s = Components.classes["@mozilla.org/xmlextras/xmlserializer;1"]
|
||||||
|
.createInstance(Components.interfaces.nsIDOMSerializer);
|
||||||
|
this.serializeToString = function(doc) {
|
||||||
|
return s.serializeToString(Zotero.Translate.DOMWrapper.unwrapIfWrapped(doc));
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Zotero.Translate.SandboxManager.prototype = {
|
Zotero.Translate.SandboxManager.prototype = {
|
||||||
|
|
Loading…
Reference in a new issue