- Fixed FTP client server infinite recursion - ftp server and clients can be installed on the same node, this could cause a loop of requests

- fixed tests broken by merged with dev
This commit is contained in:
Czar.Echavez
2023-10-05 16:24:48 +01:00
parent 4699e87ea8
commit be6b904db9
6 changed files with 30 additions and 74 deletions

View File

@@ -78,12 +78,13 @@ class WebServer(Service):
response = HTTPResponsePacket(status_code=HTTPStatusCode.BAD_REQUEST, payload=payload)
try:
parsed_url = urlparse(payload.request_url)
path = parsed_url.path.strip("/")
if parsed_url.path is None or len(parsed_url.path) < 1:
if len(path) < 1:
# query succeeded
response.status_code = HTTPStatusCode.OK
if parsed_url.path.startswith("/users"):
if path.startswith("users"):
# get data from DatabaseServer
db_client: DatabaseClient = self.software_manager.software["DatabaseClient"]
# get all users