From 58eac364a290f7dd000c2ddaf6acf5509454346d Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 16 Feb 2014 21:57:14 +0100 Subject: [PATCH] Bug fix --- lib/takeover/web.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/takeover/web.py b/lib/takeover/web.py index f48fa41ef..423a76ba4 100644 --- a/lib/takeover/web.py +++ b/lib/takeover/web.py @@ -224,7 +224,7 @@ class Web: self._webFileInject(stagerContent, stagerName, directory) for match in re.finditer('/', directory): - self.webBaseUrl = "%s://%s:%d%s" % (conf.scheme, conf.hostname, conf.port, directory[match.start():]) + self.webBaseUrl = "%s://%s:%d%s/" % (conf.scheme, conf.hostname, conf.port, directory[match.start():].rstrip('/')) self.webStagerUrl = urlparse.urljoin(self.webBaseUrl, stagerName) self.webStagerFilePath = ntToPosixSlashes(os.path.join(directory, stagerName)) @@ -263,7 +263,7 @@ class Web: uplPage = uplPage or "" for match in re.finditer('/', directory): - self.webBaseUrl = "%s://%s:%d%s" % (conf.scheme, conf.hostname, conf.port, directory[match.start():]) + self.webBaseUrl = "%s://%s:%d%s/" % (conf.scheme, conf.hostname, conf.port, directory[match.start():].rstrip('/')) self.webStagerUrl = urlparse.urljoin(self.webBaseUrl, stagerName) self.webStagerFilePath = ntToPosixSlashes(os.path.join(directory, stagerName))