Restore certificate checking for API syncing errors
Closes #864 This adds a 'channel' property to Zotero.HTTP.UnexpectedStatusException, because the 'channel' property of the XHR can be garbage-collected before handling, and the channel's 'securityInfo' property is necessary to detect certificate errors.
This commit is contained in:
parent
01fddc9bb9
commit
18349b2232
5 changed files with 139 additions and 35 deletions
|
@ -710,7 +710,7 @@ function setHTTPResponse(server, baseURL, response, responses) {
|
|||
response = responses[topic][key];
|
||||
}
|
||||
|
||||
var responseArray = [response.status || 200, {}, ""];
|
||||
var responseArray = [response.status !== undefined ? response.status : 200, {}, ""];
|
||||
if (response.json) {
|
||||
responseArray[1]["Content-Type"] = "application/json";
|
||||
responseArray[2] = JSON.stringify(response.json);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue