some rstrip ajustments
This commit is contained in:
parent
af90f32587
commit
214d996ced
|
|
@ -524,7 +524,7 @@ def _build_connection(connection, source_address, timeout, context=None):
|
||||||
"""
|
"""
|
||||||
def inner(host, **kwargs):
|
def inner(host, **kwargs):
|
||||||
kwargs.update({
|
kwargs.update({
|
||||||
'source_address': source_address,
|
'source_address': source_address.rstrip(),
|
||||||
'timeout': timeout
|
'timeout': timeout
|
||||||
})
|
})
|
||||||
if context:
|
if context:
|
||||||
|
|
@ -699,7 +699,7 @@ def build_request(url, data=None, headers=None, bump='0', secure=False):
|
||||||
headers = {}
|
headers = {}
|
||||||
|
|
||||||
# DID YOU HEARD ABOUT 'THE' LORD?
|
# DID YOU HEARD ABOUT 'THE' LORD?
|
||||||
url = url.rstrip()
|
|
||||||
|
|
||||||
if url[0] == ':':
|
if url[0] == ':':
|
||||||
scheme = ('http', 'https')[bool(secure)]
|
scheme = ('http', 'https')[bool(secure)]
|
||||||
|
|
@ -717,6 +717,8 @@ def build_request(url, data=None, headers=None, bump='0', secure=False):
|
||||||
int(timeit.time.time() * 1000),
|
int(timeit.time.time() * 1000),
|
||||||
bump)
|
bump)
|
||||||
|
|
||||||
|
final_url = final_url.rstrip()
|
||||||
|
|
||||||
headers.update({
|
headers.update({
|
||||||
'Cache-Control': 'no-cache',
|
'Cache-Control': 'no-cache',
|
||||||
})
|
})
|
||||||
|
|
@ -1460,7 +1462,7 @@ class Speedtest(object):
|
||||||
results = {}
|
results = {}
|
||||||
for server in servers:
|
for server in servers:
|
||||||
cum = []
|
cum = []
|
||||||
url = os.path.dirname(server['url'])
|
url = os.path.dirname(server['url'].rstrip())
|
||||||
stamp = int(timeit.time.time() * 1000)
|
stamp = int(timeit.time.time() * 1000)
|
||||||
latency_url = '%s/latency.txt?x=%s' % (url, stamp)
|
latency_url = '%s/latency.txt?x=%s' % (url, stamp)
|
||||||
for i in range(0, 3):
|
for i in range(0, 3):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue