#2064: add handling of offline service to dns, ftp and database

This commit is contained in:
Czar Echavez
2023-11-23 21:48:11 +00:00
parent bd6c27244c
commit f0fc6518a0
8 changed files with 86 additions and 9 deletions

View File

@@ -155,12 +155,12 @@ class WebServer(Service):
:param: payload: The payload to send.
:param: session_id: The id of the session. Optional.
"""
if not super().receive(payload=payload, session_id=session_id, **kwargs):
return False
# check if the payload is an HTTPPacket
if not isinstance(payload, HttpRequestPacket):
self.sys_log.error("Payload is not an HTTPPacket")
return False
if not super().receive(payload=payload, session_id=session_id, **kwargs):
return False
return self._process_http_request(payload=payload, session_id=session_id)