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:
parent
20e5d12a5c
commit
6cbfe20fcc
|
@ -973,7 +973,7 @@ class Speedtest(object):
|
||||||
if not extension:
|
if not extension:
|
||||||
for ext in ['php', 'asp', 'aspx', 'jsp']:
|
for ext in ['php', 'asp', 'aspx', 'jsp']:
|
||||||
try:
|
try:
|
||||||
f = urlopen('%s/speedtest/upload.%s' % (url, ext))
|
f = urlopen('%s/upload.%s' % (url, ext))
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
@ -991,7 +991,7 @@ class Speedtest(object):
|
||||||
'sponsor': 'Speedtest Mini',
|
'sponsor': 'Speedtest Mini',
|
||||||
'name': urlparts[1],
|
'name': urlparts[1],
|
||||||
'd': 0,
|
'd': 0,
|
||||||
'url': '%s/speedtest/upload.%s' % (url.rstrip('/'), extension[0]),
|
'url': '%s/upload.%s' % (url.rstrip('/'), extension[0]),
|
||||||
'latency': 0,
|
'latency': 0,
|
||||||
'id': 0
|
'id': 0
|
||||||
}]
|
}]
|
||||||
|
|
Loading…
Reference in New Issue