Skip to content
Snippets Groups Projects
Verified Commit 45960b89 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: http proxy

parent 8bc9e485
No related branches found
No related tags found
2 merge requests!79Release 0.10.0,!75F http proxy
Pipeline #29952 failed
......@@ -143,6 +143,9 @@ class _DefaultCaosDBServerConnection(CaosDBServerConnection):
headers = {}
headers["User-Agent"] = self._useragent
if path.endswith("/."):
path = path[:-1] + "%2E"
try:
response = self._session.request(
method=method,
......
......@@ -102,16 +102,13 @@ def make_uri_path(segments=None, query=None):
"""
path_no_query = ("/".join([quote(segment) for segment in segments])
if segments else "")
result = str(path_no_query if query is None else "?".join([
return str(path_no_query if query is None else "?".join([
path_no_query, "&".join([
quote(key) + "=" +
(quote(query[key]) if query[key] is not None else "")
for key in query
])
]))
if result.endswith("/."):
result = result[:-1] + "%2E"
return result
def quote(string):
......
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