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 <[email protected]>
  • Loading branch information
matesaki committed May 3, 2022
1 parent 226cb9d commit ed22b52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
]

PACKAGE = {
'version': '3.4.5',
'version': '3.4.6',
'author': [sdw, jt, ag, kh],
'maintainer': [sdw, jt, ag, kh],
# as long as 1.0.0 is not out, vsc-base should still provide vsc.fancylogger
Expand Down

0 comments on commit ed22b52

Please sign in to comment.