commit b437826bd04e2bc5fc9791003e65a2d79ae4f34f
parent 32a46044817b5639330076fb4083202ddcfd6d08
Author: Dan Stillman <dstillman@zotero.org>
Date: Sun, 22 Mar 2015 02:44:24 -0400
Include HTTP headers in output in Zotero.HTTP.request() debug mode
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/http.js b/chrome/content/zotero/xpcom/http.js
@@ -158,6 +158,9 @@ Zotero.HTTP = new function() {
if (options && options.body && !headers["Content-Type"]) {
headers["Content-Type"] = "application/x-www-form-urlencoded";
}
+ if (options.debug) {
+ Zotero.debug(headers);
+ }
for (var header in headers) {
xmlhttp.setRequestHeader(header, headers[header]);
}