Skip to content

Commit

Permalink
Complain with client tool URL ending with /
Browse files Browse the repository at this point in the history
  • Loading branch information
raulikak committed May 2, 2024
1 parent cecbd14 commit 02f7fc3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tcsfw/client_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ def upload_file_data(self, url: str, temp_file: BinaryIO):
def resolve_api_url(self, url: str) -> str:
"""Query server for API URL"""
# split URL into host and statement
if url.endswith("/"):
raise ValueError("URL should not end with /")
u = urlparse(url)
base_url = f"{u.scheme}://{u.netloc}"
path = urlunparse(('', '', u.path, u.params, u.query, u.fragment))
Expand Down

0 comments on commit 02f7fc3

Please sign in to comment.