Better detection of file extension for mini server

This commit is contained in:
Matt Martz 2016-05-26 15:20:15 -05:00
parent 9ccce5d861
commit 478f9affdd
1 changed files with 3 additions and 3 deletions

View File

@ -845,14 +845,14 @@ class Speedtest(object):
speedtest mini server
"""
name, ext = os.path.splitext(server)
urlparts = urlparse(server)
name, ext = os.path.splitext(urlparts[2])
if ext:
url = os.path.dirname(server)
else:
url = server
urlparts = urlparse(url)
request = build_request(url)
uh, e = catch_request(request)
if e: