Fix mini/legacy-http-server support

provided `--mini example.domain.com/speedtest/upload.php` as arguments, the script tried to find the file at example.domain.com/speedtest/speedtest/upload.php and failed. Fixed.
This commit is contained in:
Sagar Chandarana 2018-01-24 22:04:18 -02:00 committed by GitHub
parent 20e5d12a5c
commit 6cbfe20fcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -973,7 +973,7 @@ class Speedtest(object):
if not extension:
for ext in ['php', 'asp', 'aspx', 'jsp']:
try:
f = urlopen('%s/speedtest/upload.%s' % (url, ext))
f = urlopen('%s/upload.%s' % (url, ext))
except:
pass
else:
@ -991,7 +991,7 @@ class Speedtest(object):
'sponsor': 'Speedtest Mini',
'name': urlparts[1],
'd': 0,
'url': '%s/speedtest/upload.%s' % (url.rstrip('/'), extension[0]),
'url': '%s/upload.%s' % (url.rstrip('/'), extension[0]),
'latency': 0,
'id': 0
}]