Skip to content

Commit b235836

Browse files
benpturnerConsole
authored andcommitted
Fixed UrlConfig for Connection Reset Error
1 parent 225ebb7 commit b235836

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

poshc2/server/UrlConfig.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,10 @@ def getSockUrls(self):
6161
self.sockList = [sock1, sock2]
6262

6363
def process(self, line):
64-
output = urlparse(line).path
65-
output = output.rpartition('/')[0]
66-
output = output.replace("'", "")
67-
if output != '':
68-
if output[0] == "/":
69-
output = output.lstrip('/')
70-
if output[-1] != "/":
71-
output = output + "/"
64+
output = urlparse(line).path.rstrip().lstrip('/')
7265
output = output.replace("'", "")
66+
if output[-1] != "/":
67+
output = output + "/"
7368
return output
7469

7570
def getUrls(self):

0 commit comments

Comments
 (0)