Skip to content

Commit 32b947a

Browse files
committed
Remove double slash
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]>
1 parent 226cb9d commit 32b947a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/vsc/utils/rest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ def get_connection(self, method, url, body, headers):
215215
sep = '/'
216216
else:
217217
sep = ''
218+
if self.url.endswith('/') and url.startswith('/'):
219+
url = url[1:]
218220
if body:
219221
body = body.encode()
220222
request = Request(self.url + sep + url, data=body)

0 commit comments

Comments
 (0)