Bug 1283379 - have RESTRequest log on channel redirect. r?tcsc
MozReview-Commit-ID: 5QakocdCw7k
--- a/services/common/rest.js
+++ b/services/common/rest.js
@@ -600,16 +600,20 @@ RESTRequest.prototype = {
newChannel.URI.spec + ", internal = " + isInternal);
return isInternal && isSameURI;
},
/*** nsIChannelEventSink ***/
asyncOnChannelRedirect:
function asyncOnChannelRedirect(oldChannel, newChannel, flags, callback) {
+ let oldSpec = (oldChannel && oldChannel.URI) ? oldChannel.URI.spec : "<undefined>";
+ let newSpec = (newChannel && newChannel.URI) ? newChannel.URI.spec : "<undefined>";
+ this._log.debug("Channel redirect: " + oldSpec + ", " + newSpec + ", " + flags);
+
try {
newChannel.QueryInterface(Ci.nsIHttpChannel);
} catch (ex) {
this._log.error("Unexpected error: channel not nsIHttpChannel!");
callback.onRedirectVerifyCallback(Cr.NS_ERROR_NO_INTERFACE);
return;
}