Skip to content

Commit 0c159dd

Browse files
committed
Better logging, fix typos
1 parent b7660b8 commit 0c159dd

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/chrome/content/code/HTTPS.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const HTTPS = {
3737
if (!uri) this.log(WARN, "OH NO BAD ARGH\nARGH");
3838

3939
var c2 = channel.QueryInterface(CI.nsIHttpChannel);
40-
this.log(DBUG,"Redirection limit is " + c2.redirectionLimit);
40+
this.log(DBUG, channel.URI.spec+": Redirection limit is " + c2.redirectionLimit);
4141
// XXX This used to be (c2.redirectionLimit == 1), but that's very
4242
// inefficient in a case (eg amazon) where this may happen A LOT.
4343
// Rather than number like 10, we should use the starting value

src/chrome/content/code/HTTPSRules.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,11 +472,13 @@ const HTTPSRules = {
472472
blob.newuri = rs[i].transformURI(uri);
473473
if (blob.newuri) {
474474
// we rewrote the uri
475-
if (alist)
475+
this.log(DBUG, "Rewrote "+input_uri.spec);
476+
if (alist) {
476477
if (uri.spec in https_everywhere_blacklist)
477-
alist.breaking_rule(rs[i])
478+
alist.breaking_rule(rs[i]);
478479
else
479480
alist.active_rule(rs[i]);
481+
}
480482
if (userpass_present) blob.newuri.userPass = input_uri.userPass;
481483
blob.applied_ruleset = rs[i];
482484
return blob;

src/components/https-everywhere.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ HTTPSEverywhere.prototype = {
430430
if (!(channel instanceof CI.nsIHttpChannel)) return;
431431

432432
this.log(DBUG,"Got http-on-modify-request: "+channel.URI.spec);
433-
var lst = this.getApplicableListForChannel(channel);
433+
var lst = this.getApplicableListForChannel(channel); // null if no window is associated (ex: xhr)
434434
if (channel.URI.spec in https_everywhere_blacklist) {
435435
this.log(DBUG, "Avoiding blacklisted " + channel.URI.spec);
436436
if (lst) lst.breaking_rule(https_everywhere_blacklist[channel.URI.spec])
@@ -541,7 +541,7 @@ HTTPSEverywhere.prototype = {
541541
// nsIChannelEventSink implementation
542542
onChannelRedirect: function(oldChannel, newChannel, flags) {
543543
const uri = newChannel.URI;
544-
this.log(DBUG,"Got onChannelRedirect.");
544+
this.log(DBUG,"Got onChannelRedirect to "+uri.spec);
545545
if (!(newChannel instanceof CI.nsIHttpChannel)) {
546546
this.log(DBUG, newChannel + " is not an instance of nsIHttpChannel");
547547
return;

0 commit comments

Comments
 (0)