Bug 1334838 - Avoid matching same host with a non-test URI a=testonly draft
authorKate McKinley <kmckinley@mozilla.com>
Wed, 08 Feb 2017 11:28:29 +0800
changeset 480453 73927e8579ec1381cf02a1b7d086054efab5063c
parent 468147 531b72b93b87a4852a4103088810e4043e49d71c
child 544958 bb76708d1d0e9b3815b18bbe214f806e96d9847d
push id44548
push userbmo:kmckinley@mozilla.com
push dateWed, 08 Feb 2017 08:43:55 +0000
reviewerstestonly
bugs1334838
milestone54.0a1
Bug 1334838 - Avoid matching same host with a non-test URI a=testonly MozReview-Commit-ID: 7Ok7FXFtMoH
dom/security/test/hsts/head.js
--- a/dom/security/test/hsts/head.js
+++ b/dom/security/test/hsts/head.js
@@ -292,17 +292,17 @@ var Observer = {
 
     is("blocked", test_settings[which_test].result[curTest.id], "HSTS priming "+
         which_test+":"+curTest.id+" expected "+
         test_settings[which_test].result[curTest.id]+", got blocked");
     test_settings[which_test].finished[curTest.id] = "blocked";
   },
   get_current_test: function(uri) {
     for (let item in test_servers) {
-      let re = RegExp('https?://'+test_servers[item].host);
+      let re = RegExp('https?://'+test_servers[item].host+'.*\/browser/dom/security/test/hsts/file_testserver.sjs');
       if (re.test(uri)) {
         return test_servers[item];
       }
     }
     return null;
   },
   http_on_modify_request: function (subject, topic, data) {
     let channel = subject.QueryInterface(Ci.nsIHttpChannel);