@@ -121,32 +121,32 @@ RuleSet.prototype = {
121121 log : function ( level , msg ) {
122122 https_everywhereLog ( level , msg ) ;
123123 } ,
124-
124+
125125 wouldMatch : function ( hypothetical_uri , alist ) {
126126 // return true if this ruleset would match the uri, assuming it were http
127127 // used for judging moot / inactive rulesets
128128 // alist is optional
129-
129+
130130 // if the ruleset is already somewhere in this applicable list, we don't
131131 // care about hypothetical wouldMatch questions
132132 if ( alist && ( this . name in alist . all ) ) return false ;
133-
133+
134134 this . log ( DBUG , "Would " + this . name + " match " + hypothetical_uri . spec +
135135 "? serial " + ( alist && alist . serial ) ) ;
136-
136+
137137 var uri = hypothetical_uri . clone ( ) ;
138138 if ( uri . scheme == "https" ) uri . scheme = "http" ;
139139 var urispec = uri . spec ;
140140
141141 this . ensureCompiled ( ) ;
142142
143- if ( this . ruleset_match_c && ! this . ruleset_match_c . test ( urispec ) )
143+ if ( this . ruleset_match_c && ! this . ruleset_match_c . test ( urispec ) )
144144 return false ;
145145
146- for ( var i = 0 ; i < this . exclusions . length ; ++ i )
146+ for ( var i = 0 ; i < this . exclusions . length ; ++ i )
147147 if ( this . exclusions [ i ] . pattern_c . test ( urispec ) ) return false ;
148148
149- for ( var i = 0 ; i < this . rules . length ; ++ i )
149+ for ( var i = 0 ; i < this . rules . length ; ++ i )
150150 if ( this . rules [ i ] . from_c . test ( urispec ) ) return true ;
151151 return false ;
152152 } ,
@@ -156,7 +156,7 @@ RuleSet.prototype = {
156156 // inactive, return 0; otherwise, return a fresh uri instance
157157 // for the target
158158 var newurl = this . apply ( uri . spec ) ;
159- if ( null == newurl )
159+ if ( null == newurl )
160160 return null ;
161161 var newuri = Components . classes [ "@mozilla.org/network/standard-url;1" ] .
162162 createInstance ( CI . nsIStandardURL ) ;
@@ -269,10 +269,7 @@ const RuleWriter = {
269269
270270 return data . value ;
271271 } ,
272- << < << << HEAD
273- === = ===
274272
275- >>> > >>> effRelease
276273 readFromFile : function ( file ) {
277274 if ( ! file . exists ( ) )
278275 return null ;
@@ -499,7 +496,7 @@ const HTTPSRules = {
499496 // the new uri if there was a rewrite. Now it returns a JS object with a
500497 // newuri attribute and an applied_ruleset attribute (or null if there's
501498 // no rewrite).
502- var i = 0 ;
499+ var i = 0 ;
503500 userpass_present = false ; // Global so that sanitiseURI can tweak it.
504501 // Why does JS have no tuples, again?
505502 var blob = { } ; blob . newuri = null ;
@@ -523,13 +520,13 @@ const HTTPSRules = {
523520 if ( alist && rs [ i ] . wouldMatch ( uri , alist ) )
524521 alist . inactive_rule ( rs [ i ] ) ;
525522 continue ;
526- }
523+ }
527524 blob . newuri = rs [ i ] . transformURI ( uri ) ;
528525 if ( blob . newuri ) {
529526 if ( alist ) {
530- if ( uri . spec in https_everywhere_blacklist )
527+ if ( uri . spec in https_everywhere_blacklist )
531528 alist . breaking_rule ( rs [ i ] ) ;
532- else
529+ else
533530 alist . active_rule ( rs [ i ] ) ;
534531 }
535532 if ( userpass_present ) blob . newuri . userPass = input_uri . userPass ;
@@ -541,7 +538,7 @@ const HTTPSRules = {
541538 // requests are going over https
542539 if ( rs [ i ] . wouldMatch ( uri , alist ) ) alist . moot_rule ( rs [ i ] ) ;
543540 continue ;
544- }
541+ }
545542 }
546543 return null ;
547544 } ,
@@ -557,7 +554,7 @@ const HTTPSRules = {
557554 uri = input_uri . clone ( ) ;
558555 userpass_present = true ; // tweaking a global in our caller :(
559556 uri . userPass = null ;
560- }
557+ }
561558 } catch ( e ) { }
562559
563560 // example.com. is equivalent to example.com
@@ -567,7 +564,7 @@ const HTTPSRules = {
567564 try {
568565 var h = uri . host ;
569566 if ( h . charAt ( h . length - 1 ) == "." ) {
570- while ( h . charAt ( h . length - 1 ) == "." )
567+ while ( h . charAt ( h . length - 1 ) == "." )
571568 h = h . slice ( 0 , - 1 ) ;
572569 uri = uri . clone ( ) ;
573570 uri . host = h ;
@@ -760,7 +757,7 @@ const HTTPSRules = {
760757 nonce_path = nonce_path + nonce_path ;
761758 var test_uri = "http://" + domain + nonce_path ;
762759 } catch ( e ) {
763- this . log ( WARN , "explosion in safeToSecureCookie for " + domain + "\n"
760+ this . log ( WARN , "explosion in safeToSecureCookie for " + domain + "\n"
764761 + "(" + e + ")" ) ;
765762 return false ;
766763 }
0 commit comments