Skip to content
Snippets Groups Projects
Verified Commit 0f0211fb authored by Duncan Macleod's avatar Duncan Macleod
Browse files

gwdatafind.http: fix bugs in old HTTP API

parent cddb699b
No related branches found
No related tags found
No related merge requests found
Pipeline #393688 passed
......@@ -91,6 +91,8 @@ class HTTPConnection(http_client.HTTPConnection):
RuntimeError
if query is unsuccessful
"""
if not url.startswith("/"): # ensure all URLs start with a slash
url = f"/{url}"
self.request(method, url, **kwargs)
response = self.getresponse()
if response.status != 200:
......@@ -272,8 +274,8 @@ class HTTPConnection(http_client.HTTPConnection):
path = api.find_times_path(
site,
frametype,
gpsstart or 1,
gpsend or 2e9,
gpsstart or int(1),
gpsend or int(2e9),
)
segmentlist = self.get_json(path)
return segments.segmentlist(map(segments.segment, segmentlist))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment