Merge branch '3.0'

This commit is contained in:
Simon Kornblith 2012-02-17 14:48:26 -05:00
commit c36a2b32b1
2 changed files with 18 additions and 1 deletions

View file

@ -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";

View file

@ -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 = {