- Remove overriding OPTIONS response to text/plain -- the problem is incorrect status codes generated by IIS that result in "No element found" errors

- Replace passwords in malformed XML messages when generating error reports
This commit is contained in:
Dan Stillman 2008-09-15 09:48:27 +00:00
parent 1619491157
commit eac0c1a94d
2 changed files with 10 additions and 3 deletions

View File

@ -903,7 +903,6 @@ Zotero.Utilities.HTTP = new function() {
xmlhttp.onreadystatechange = function() {
_stateChange(xmlhttp, callback);
};
xmlhttp.overrideMimeType("text/plain");
xmlhttp.send(null);
return xmlhttp;
}
@ -973,7 +972,6 @@ Zotero.Utilities.HTTP = new function() {
};
xmlhttp.send(body);
return xmlhttp;
}

View File

@ -598,8 +598,17 @@ var Zotero = new function(){
}
}
// Remove password in malformed XML messages
if (msg.category == 'malformed-xml') {
try {
// msg.message is read-only, so store separately
var altMessage = msg.message.replace(/(file: "https?:\/\/[^:]+:)([^@]+)(@[^"]+")/, "$1********$3");
}
catch (e) {}
}
if (asStrings) {
errors.push(msg.message)
errors.push(altMessage ? altMessage : msg.message)
}
else {
errors.push(msg);