Убирать знак ? если приходит путь к папке через URL

dev-linux
Ivan Maslov 3 years ago
parent 6baa53f09c
commit 97176d9e2d

@ -317,6 +317,7 @@ class testHTTPServer_RequestHandler(BaseHTTPRequestHandler):
lRequestPath = urllib.parse.unquote(inRequest.path) lRequestPath = urllib.parse.unquote(inRequest.path)
if inURLItem["URL"][-1]!="/": inURLItem["URL"]+= "/" # Fix for settings if inURLItem["URL"][-1]!="/": inURLItem["URL"]+= "/" # Fix for settings
lFilePathSecondPart = lRequestPath.replace(inURLItem["URL"],"") lFilePathSecondPart = lRequestPath.replace(inURLItem["URL"],"")
lFilePathSecondPart = lFilePathSecondPart.split("?")[0]
lFilePath = os.path.join(inURLItem["ResponseFolderPath"],lFilePathSecondPart) lFilePath = os.path.join(inURLItem["ResponseFolderPath"],lFilePathSecondPart)
#print(f"File full path {lFilePath}") #print(f"File full path {lFilePath}")
#Check if file exist #Check if file exist

Loading…
Cancel
Save