Use HTTPS URLs where possible

This commit is contained in:
Matt Martz 2015-02-26 10:25:33 -06:00
parent 3cc06168f5
commit 7383ad97af
1 changed files with 5 additions and 5 deletions

View File

@ -339,7 +339,7 @@ def getConfig():
we are interested in we are interested in
""" """
request = build_request('http://www.speedtest.net/speedtest-config.php') request = build_request('https://www.speedtest.net/speedtest-config.php')
uh = catch_request(request) uh = catch_request(request)
if uh is False: if uh is False:
print_('Could not retrieve speedtest.net configuration') print_('Could not retrieve speedtest.net configuration')
@ -381,8 +381,8 @@ def closestServers(client, all=False):
""" """
urls = [ urls = [
'https://www.speedtest.net/speedtest-servers-static.php',
'http://c.speedtest.net/speedtest-servers-static.php', 'http://c.speedtest.net/speedtest-servers-static.php',
'http://www.speedtest.net/speedtest-servers-static.php',
] ]
servers = {} servers = {}
for url in urls: for url in urls:
@ -726,8 +726,8 @@ def speedtest():
(ping, ulspeedk, dlspeedk, '297aae72')) (ping, ulspeedk, dlspeedk, '297aae72'))
.encode()).hexdigest()] .encode()).hexdigest()]
headers = {'Referer': 'http://c.speedtest.net/flash/speedtest.swf'} headers = {'Referer': 'https://c.speedtest.net/flash/speedtest.swf'}
request = build_request('http://www.speedtest.net/api/api.php', request = build_request('https://www.speedtest.net/api/api.php',
data='&'.join(apiData).encode(), data='&'.join(apiData).encode(),
headers=headers) headers=headers)
f = catch_request(request) f = catch_request(request)
@ -748,7 +748,7 @@ def speedtest():
print_('Could not submit results to speedtest.net') print_('Could not submit results to speedtest.net')
sys.exit(1) sys.exit(1)
print_('Share results: http://www.speedtest.net/result/%s.png' % print_('Share results: https://www.speedtest.net/result/%s.png' %
resultid[0]) resultid[0])