Skip to content

Commit

Permalink
Remove double slash
Browse files Browse the repository at this point in the history
Merging domain url and path url create double slash
which causes on localhost error 404 (Page not found).

Signed-off-by: Martin Sakin <marty@inuits.eu>
  • Loading branch information
matesaki committed May 3, 2022
1 parent 226cb9d commit 32b947a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/vsc/utils/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ def get_connection(self, method, url, body, headers):
sep = '/'
else:
sep = ''
if self.url.endswith('/') and url.startswith('/'):
url = url[1:]
if body:
body = body.encode()
request = Request(self.url + sep + url, data=body)
Expand Down

0 comments on commit 32b947a

Please sign in to comment.