From b2358366670908587ce81a15943c7c7ad1b1675d Mon Sep 17 00:00:00 2001 From: benpturner <2518196+benpturner@users.noreply.github.com> Date: Thu, 17 Sep 2020 15:43:43 +0100 Subject: [PATCH] Fixed UrlConfig for Connection Reset Error --- poshc2/server/UrlConfig.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/poshc2/server/UrlConfig.py b/poshc2/server/UrlConfig.py index 926ce14c..61508cdd 100644 --- a/poshc2/server/UrlConfig.py +++ b/poshc2/server/UrlConfig.py @@ -61,15 +61,10 @@ def getSockUrls(self): self.sockList = [sock1, sock2] def process(self, line): - output = urlparse(line).path - output = output.rpartition('/')[0] - output = output.replace("'", "") - if output != '': - if output[0] == "/": - output = output.lstrip('/') - if output[-1] != "/": - output = output + "/" + output = urlparse(line).path.rstrip().lstrip('/') output = output.replace("'", "") + if output[-1] != "/": + output = output + "/" return output def getUrls(self):