Skip to content

Commit f151817

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 f151817

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/vsc/utils/rest.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,11 @@ def hash_pass(self, password, username=None):
211211
return 'Basic ' + encoded_credentials
212212

213213
def get_connection(self, method, url, body, headers):
214-
if not self.url.endswith('/') and not url.startswith('/'):
215-
sep = '/'
216-
else:
214+
url = url.lstrip('/')
215+
if self.url.endswith('/'):
217216
sep = ''
217+
else:
218+
sep = '/'
218219
if body:
219220
body = body.encode()
220221
request = Request(self.url + sep + url, data=body)

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
]
4545

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

0 commit comments

Comments
 (0)