Bug 960571: Switch downloads from http://ftp.mozilla.org to https://ftp-ssl.mozilla.org r=aki
authorChris AtLee <catlee@mozilla.com>
Tue, 28 Jan 2014 18:21:17 -0500
changeset 2334 8ac0f103b3de5e0a86104d851449c92f7467687c
parent 2330 36c2a89a53bf6f6dd56de3851b598302d7293726
child 2335 d04ed03a6678321d9dbadb3ec6d88ca04f205035
push id1680
push usercatlee@mozilla.com
push dateTue, 28 Jan 2014 23:22:03 +0000
reviewersaki
bugs960571
Bug 960571: Switch downloads from http://ftp.mozilla.org to https://ftp-ssl.mozilla.org r=aki
mozharness/mozilla/testing/testbase.py
--- a/mozharness/mozilla/testing/testbase.py
+++ b/mozharness/mozilla/testing/testbase.py
@@ -261,16 +261,27 @@ 2. running via buildbot and running the 
                                    write_to_file=True)
         self.run_command(['unzip', '-q', source], cwd=self.symbols_path,
                          halt_on_failure=True)
 
     def download_and_extract(self, target_unzip_dirs=None):
         """
         download and extract test zip / download installer
         """
+        # Swap plain http for https when we're downloading from ftp
+        # See bug 957502 and friends
+        from_ = "http://ftp.mozilla.org"
+        to_ = "https://ftp-ssl.mozilla.org"
+        for attr in 'test_url', 'symbols_url', 'installer_url':
+            url = getattr(self, attr)
+            if url and url.startswith(from_):
+                new_url = url.replace(from_, to_)
+                self.info("Replacing url %s -> %s" % (url, new_url))
+                setattr(self, attr, new_url)
+
         if self.test_url:
             self._download_test_zip()
             self._extract_test_zip(target_unzip_dirs=target_unzip_dirs)
             self._read_tree_config()
         self._download_installer()
         if self.config.get('download_symbols'):
             self._download_and_extract_symbols()